use OwnedMxcUri in media service

Not using `MxcData` because it borrows it's fields, and so we wouldn't
be able to return an owned `MxcData` from functions that read the db.
This commit is contained in:
Benjamin Lee 2024-09-14 20:43:56 -07:00
parent e2cba15ed2
commit 7672cc8473
No known key found for this signature in database
GPG key ID: FB9624E2885D55A4
5 changed files with 25 additions and 23 deletions

View file

@ -2062,7 +2062,7 @@ pub(crate) async fn media_download_route(
content_type,
},
file,
)) = services().media.get(mxc.to_string()).await?
)) = services().media.get(mxc.into()).await?
else {
return Err(Error::BadRequest(
ErrorKind::NotYetUploaded,
@ -2109,7 +2109,7 @@ pub(crate) async fn media_thumbnail_route(
..
},
file,
)) = services().media.get_thumbnail(mxc.to_string(), width, height).await?
)) = services().media.get_thumbnail(mxc.into(), width, height).await?
else {
return Err(Error::BadRequest(
ErrorKind::NotYetUploaded,