♻️ Use the new dealer BaseUser and remove ExternalID

This commit is contained in:
2024-09-11 23:49:20 +08:00
parent 78705e82a8
commit 6c5a99e867
7 changed files with 21 additions and 93 deletions

View File

@@ -1,19 +0,0 @@
package exts
import (
"git.solsynth.dev/hydrogen/dealer/pkg/proto"
"git.solsynth.dev/hydrogen/paperclip/pkg/internal/services"
"github.com/gofiber/fiber/v2"
)
func LinkAccountMiddleware(c *fiber.Ctx) error {
if val, ok := c.Locals("p_user").(*proto.UserInfo); ok {
if account, err := services.LinkAccount(val); err != nil {
return fiber.NewError(fiber.StatusInternalServerError, err.Error())
} else {
c.Locals("user", account)
}
}
return c.Next()
}