👽 Upgrade to new events audit system

This commit is contained in:
2025-03-15 17:18:35 +08:00
parent ce257f83b8
commit 1c927122c2
8 changed files with 66 additions and 69 deletions

View File

@@ -260,7 +260,7 @@ func deletePost(c *fiber.Ctx) error {
_ = authkit.AddEventExt(
gap.Nx,
"posts.delete",
strconv.Itoa(int(item.ID)),
map[string]any{"post": item},
c,
)
}
@@ -302,7 +302,7 @@ func reactPost(c *fiber.Ctx) error {
_ = authkit.AddEventExt(
gap.Nx,
"posts.react",
strconv.Itoa(int(res.ID)),
map[string]any{"post_id": res.ID, "reaction": reaction},
c,
)
@@ -327,7 +327,7 @@ func pinPost(c *fiber.Ctx) error {
_ = authkit.AddEventExt(
gap.Nx,
"posts.pin",
strconv.Itoa(int(res.ID)),
map[string]any{"post": res},
c,
)
return c.SendStatus(fiber.StatusOK)
@@ -335,7 +335,7 @@ func pinPost(c *fiber.Ctx) error {
_ = authkit.AddEventExt(
gap.Nx,
"posts.unpin",
strconv.Itoa(int(res.ID)),
map[string]any{"post": res},
c,
)
return c.SendStatus(fiber.StatusNoContent)