[backend/api] Fix profile avatar and banner endpoints
This commit is contained in:
parent
dff87e9db5
commit
24e7624487
1 changed files with 4 additions and 5 deletions
|
@ -21,7 +21,6 @@ namespace Iceshrimp.Backend.Controllers.Web;
|
||||||
[Route("/api/iceshrimp/profile")]
|
[Route("/api/iceshrimp/profile")]
|
||||||
[Produces(MediaTypeNames.Application.Json)]
|
[Produces(MediaTypeNames.Application.Json)]
|
||||||
public class ProfileController(
|
public class ProfileController(
|
||||||
IOptions<Config.InstanceSection> instance,
|
|
||||||
UserService userSvc,
|
UserService userSvc,
|
||||||
DriveService driveSvc,
|
DriveService driveSvc,
|
||||||
DatabaseContext db
|
DatabaseContext db
|
||||||
|
@ -126,8 +125,8 @@ public class ProfileController(
|
||||||
return new DriveFileResponse
|
return new DriveFileResponse
|
||||||
{
|
{
|
||||||
Id = file.Id,
|
Id = file.Id,
|
||||||
Url = file.AccessUrl,
|
Url = file.RawAccessUrl,
|
||||||
ThumbnailUrl = file.ThumbnailAccessUrl,
|
ThumbnailUrl = file.RawThumbnailAccessUrl,
|
||||||
Filename = file.Name,
|
Filename = file.Name,
|
||||||
ContentType = file.Type,
|
ContentType = file.Type,
|
||||||
Sensitive = file.IsSensitive,
|
Sensitive = file.IsSensitive,
|
||||||
|
@ -196,8 +195,8 @@ public class ProfileController(
|
||||||
return new DriveFileResponse
|
return new DriveFileResponse
|
||||||
{
|
{
|
||||||
Id = file.Id,
|
Id = file.Id,
|
||||||
Url = file.AccessUrl,
|
Url = file.RawAccessUrl,
|
||||||
ThumbnailUrl = file.ThumbnailAccessUrl,
|
ThumbnailUrl = file.RawThumbnailAccessUrl,
|
||||||
Filename = file.Name,
|
Filename = file.Name,
|
||||||
ContentType = file.Type,
|
ContentType = file.Type,
|
||||||
Sensitive = file.IsSensitive,
|
Sensitive = file.IsSensitive,
|
||||||
|
|
Loading…
Add table
Reference in a new issue