diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 9e9f776..2c61561 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -4,7 +4,7 @@
-
+
@@ -152,7 +152,6 @@
-
@@ -177,7 +176,8 @@
-
+
+
true
diff --git a/pkg/internal/server/api/statuses_api.go b/pkg/internal/server/api/statuses_api.go
index 17eb42c..6c097cc 100644
--- a/pkg/internal/server/api/statuses_api.go
+++ b/pkg/internal/server/api/statuses_api.go
@@ -55,10 +55,10 @@ func getMyselfStatus(c *fiber.Ctx) error {
}
func setStatus(c *fiber.Ctx) error {
- user := c.Locals("user").(models.Account)
if err := exts.EnsureAuthenticated(c); err != nil {
return err
}
+ user := c.Locals("user").(models.Account)
var req struct {
Type string `json:"type" validate:"required"`
@@ -97,10 +97,10 @@ func setStatus(c *fiber.Ctx) error {
}
func editStatus(c *fiber.Ctx) error {
- user := c.Locals("user").(models.Account)
if err := exts.EnsureAuthenticated(c); err != nil {
return err
}
+ user := c.Locals("user").(models.Account)
var req struct {
Type string `json:"type" validate:"required"`
@@ -135,10 +135,10 @@ func editStatus(c *fiber.Ctx) error {
}
func clearStatus(c *fiber.Ctx) error {
- user := c.Locals("user").(models.Account)
if err := exts.EnsureAuthenticated(c); err != nil {
return err
}
+ user := c.Locals("user").(models.Account)
if err := services.ClearStatus(user); err != nil {
return fiber.NewError(fiber.StatusInternalServerError, err.Error())