Add reinstate feature for deleted files

- Add MarkNotDeleted method to repository
- Add ReinstateFile method to service
- Add AdminReinstate handler
- Add /reinstate/:id route
- Add Reinstate button in admin menu for deleted files
This commit is contained in:
root
2026-04-15 16:35:08 +02:00
parent 9aeb7faa15
commit 73b67ab61d
5 changed files with 51 additions and 0 deletions

View File

@@ -183,6 +183,10 @@
<form action="/api/files/admin/delete/{{.ID}}" method="GET" onsubmit="return openConfirm(event, 'TERMINATE', 'Kill this file? It will be removed from active storage.')">
<button type="submit" style="background: #ffcccc;">Terminate</button>
</form>
{{else}}
<form action="/api/files/admin/reinstate/{{.ID}}" method="GET" onsubmit="return openConfirm(event, 'REINSTATE', 'Restore this file to active status?')">
<button type="submit" style="background: #ccffcc;">Reinstate</button>
</form>
{{end}}
<form action="/api/files/admin/delete/fr/{{.ID}}" method="GET" onsubmit="return openConfirm(event, 'FULL_WIPE', 'Wiping file and purging record? This is a permanent database scrub.')">
<button type="submit">Full_Wipe</button>