🛂 Add permission node at create reactions

This commit is contained in:
LittleSheep 2024-08-04 22:24:41 +08:00
parent 6bb5699ec4
commit 0383cdf407

View File

@ -135,7 +135,7 @@ func deletePost(c *fiber.Ctx) error {
} }
func reactPost(c *fiber.Ctx) error { func reactPost(c *fiber.Ctx) error {
if err := gap.H.EnsureAuthenticated(c); err != nil { if err := gap.H.EnsureGrantedPerm(c, "CreateReactions", true); err != nil {
return err return err
} }
user := c.Locals("user").(models.Account) user := c.Locals("user").(models.Account)