Changeset 0.8.2 (#45)
This commit is contained in:
@@ -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,
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user