🐛 Bug fixes

This commit is contained in:
2024-11-03 02:14:56 +08:00
parent 2d119826fe
commit 3f9df23491
14 changed files with 244 additions and 373 deletions

View File

@@ -27,7 +27,7 @@ func getPool(c *fiber.Ctx) error {
}
func createPool(c *fiber.Ctx) error {
user := c.Locals("nex_user").(sec.UserInfo)
user := c.Locals("nex_user").(*sec.UserInfo)
var data struct {
Alias string `json:"alias" validate:"required"`
@@ -56,7 +56,7 @@ func createPool(c *fiber.Ctx) error {
}
func updatePool(c *fiber.Ctx) error {
user := c.Locals("nex_user").(sec.UserInfo)
user := c.Locals("nex_user").(*sec.UserInfo)
var data struct {
Alias string `json:"alias" validate:"required"`
@@ -88,7 +88,7 @@ func updatePool(c *fiber.Ctx) error {
}
func deletePool(c *fiber.Ctx) error {
user := c.Locals("nex_user").(sec.UserInfo)
user := c.Locals("nex_user").(*sec.UserInfo)
id, _ := c.ParamsInt("id")
pool, err := services.GetAttachmentPoolWithUser(uint(id), user.ID)