add event log retrieval
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2024-01-17 12:20:01 +11:00
parent 5f63ee235b
commit f68bd9637d
8 changed files with 75 additions and 12 deletions

View File

@@ -149,7 +149,7 @@ func StoreSecret(c *gin.Context) {
UserId: UserId,
EventText: fmt.Sprintf("Created Secret Id %d", s.SecretId),
}
a.AuditAdd()
a.AutidLogAdd()
c.JSON(http.StatusOK, gin.H{"message": "secret stored successfully", "data": models.SecretRestricted(s)})
}
@@ -370,7 +370,7 @@ func UpdateSecret(c *gin.Context) {
UserId: UserId,
EventText: fmt.Sprintf("Updated Secret Id %d", s.SecretId),
}
a.AuditAdd()
a.AutidLogAdd()
c.JSON(http.StatusOK, gin.H{"message": "secret updated successfully", "data": models.SecretRestricted(s)})
} else {
@@ -460,7 +460,7 @@ func DeleteSecret(c *gin.Context) {
UserId: UserId,
EventText: fmt.Sprintf("Deleted Secret Id %d", s.SecretId),
}
a.AuditAdd()
a.AutidLogAdd()
c.JSON(http.StatusOK, gin.H{"message": "secret deleted successfully"})
} else {