mirror of
https://github.com/hpd840321/craftlabs-authorization-sdk.git
synced 2026-06-09 18:10:30 +08:00
feat(m10): add audit retention policy configuration
This commit is contained in:
+9
@@ -18,6 +18,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/api/v1/audit-events")
|
||||
@@ -77,6 +78,14 @@ public class AuditController {
|
||||
.body(resource);
|
||||
}
|
||||
|
||||
@GetMapping("/retention-config")
|
||||
public ResponseEntity<Map<String, Object>> getRetentionConfig() {
|
||||
return ResponseEntity.ok(Map.of(
|
||||
"retentionDays", 365,
|
||||
"autoCleanup", false
|
||||
));
|
||||
}
|
||||
|
||||
private static String escapeCsv(String value) {
|
||||
if (value == null) return "";
|
||||
if (value.contains(",") || value.contains("\"") || value.contains("\n")) {
|
||||
|
||||
Reference in New Issue
Block a user