Changeset 0.8.2 (#45)

This commit is contained in:
2026-02-22 01:56:58 +00:00
parent c0d95fd7f5
commit 5111d595f7
14 changed files with 642 additions and 6 deletions

View File

@@ -373,6 +373,9 @@ func (h *PresetHandler) CreateAdminPreset(c *gin.Context) {
}
c.JSON(http.StatusCreated, gin.H{"id": id})
AuditLog(c, "preset.create", "preset", id, map[string]interface{}{
"name": req.Name, "scope": "global", "base_model": req.BaseModelID,
})
}
// UpdateAdminPreset updates any preset (admin can edit global and personal).
@@ -613,6 +616,9 @@ func (h *PresetHandler) CreateTeamPreset(c *gin.Context) {
}
c.JSON(http.StatusCreated, gin.H{"id": id})
AuditLog(c, "preset.create", "preset", id, map[string]interface{}{
"name": req.Name, "scope": "team", "team_id": teamID, "base_model": req.BaseModelID,
})
}
// DeleteTeamPreset deletes a team-scoped preset.
@@ -634,4 +640,7 @@ func (h *PresetHandler) DeleteTeamPreset(c *gin.Context) {
}
c.JSON(http.StatusOK, gin.H{"ok": true})
AuditLog(c, "preset.delete", "preset", presetID, map[string]interface{}{
"scope": "team", "team_id": teamID,
})
}