From f69f1026d85af49792711f12e91deeac93c3298e Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Wed, 26 Jun 2024 17:16:14 +0800 Subject: [PATCH] :bug: Fix avatar and banner APIs --- .idea/workspace.xml | 63 ++++++++++++--------------- pkg/internal/server/api/avatar_api.go | 4 +- web/src/components/UserMenu.vue | 2 +- web/src/views/dashboard.vue | 4 +- 4 files changed, 34 insertions(+), 39 deletions(-) diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 92b04ce..e4c17c7 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -4,15 +4,10 @@ - @@ -176,7 +170,8 @@ - true diff --git a/pkg/internal/server/api/avatar_api.go b/pkg/internal/server/api/avatar_api.go index 3bc27c1..2d0be4f 100644 --- a/pkg/internal/server/api/avatar_api.go +++ b/pkg/internal/server/api/avatar_api.go @@ -94,7 +94,7 @@ func getAvatar(c *fiber.Ctx) error { if content := user.GetAvatar(); content == nil { return c.SendStatus(fiber.StatusNotFound) } else { - return c.Redirect(*content, fiber.StatusNotFound) + return c.Redirect(*content, fiber.StatusFound) } } @@ -107,6 +107,6 @@ func getBanner(c *fiber.Ctx) error { if content := user.GetBanner(); content == nil { return c.SendStatus(fiber.StatusNotFound) } else { - return c.Redirect(*content, fiber.StatusNotFound) + return c.Redirect(*content, fiber.StatusFound) } } diff --git a/web/src/components/UserMenu.vue b/web/src/components/UserMenu.vue index 0786ed8..4fe1467 100755 --- a/web/src/components/UserMenu.vue +++ b/web/src/components/UserMenu.vue @@ -2,7 +2,7 @@ diff --git a/web/src/views/dashboard.vue b/web/src/views/dashboard.vue index f86f4cd..27a996d 100755 --- a/web/src/views/dashboard.vue +++ b/web/src/views/dashboard.vue @@ -1,14 +1,14 @@