feat: add basic deletion finding

This commit is contained in:
2026-04-26 18:43:23 +02:00
parent 7c069c0437
commit f589ae4faf
6 changed files with 79 additions and 60 deletions
+2 -2
View File
@@ -27,7 +27,7 @@ func RegisterApiRoutes(api *gin.RouterGroup /* env runtime.Environment,*/, db *g
// Display the information on what is going on at the moment
api.GET("/command", func(c *gin.Context) {
state, err := database.GetState(db)
state, err := database.LatestState(db)
if err != nil {
slog.Error("unable to determine state", "error", err)
c.JSON(http.StatusInternalServerError, response.BasicResponse{
@@ -48,7 +48,7 @@ func RegisterApiRoutes(api *gin.RouterGroup /* env runtime.Environment,*/, db *g
// define a route to check what is registered
api.GET("/available", func(c *gin.Context) {
files, err := database.GetFiles(db)
files, err := database.ListFiles(db)
if err != nil {
slog.Error("failed to retrieve available files", "error", err)
c.JSON(http.StatusInternalServerError, response.BasicResponse{