👽 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

@ -3,7 +3,6 @@ package api
import (
"context"
"fmt"
"strconv"
"time"
"git.solsynth.dev/hypernet/interactive/pkg/internal/database"
@ -148,7 +147,7 @@ func createQuestion(c *fiber.Ctx) error {
_ = authkit.AddEventExt(
gap.Nx,
"posts.new",
strconv.Itoa(int(item.ID)),
map[string]any{"post": item},
c,
)
}
@ -262,7 +261,7 @@ func editQuestion(c *fiber.Ctx) error {
_ = authkit.AddEventExt(
gap.Nx,
"posts.edit",
strconv.Itoa(int(item.ID)),
map[string]any{"post": item},
c,
)
}
@ -344,7 +343,10 @@ func selectQuestionAnswer(c *fiber.Ctx) error {
_ = authkit.AddEventExt(
gap.Nx,
"posts.edit.answer",
strconv.Itoa(int(item.ID)),
map[string]any{
"post": item,
"answer": answer,
},
c,
)
}