diff --git a/server/task.go b/server/task.go index d5b9c79..d74d525 100644 --- a/server/task.go +++ b/server/task.go @@ -57,7 +57,7 @@ func handleTasks(w http.ResponseWriter, r *http.Request) { err := createTask(r.Context(), r) if err != nil { slog.ErrorContext(r.Context(), "Create Task", "err", err) - http.Error(w, "Error Create Library: "+err.Error(), http.StatusInternalServerError) + http.Error(w, "Error Create Tasks: "+err.Error(), http.StatusInternalServerError) return } } @@ -177,7 +177,7 @@ func createTask(ctx context.Context, r *http.Request) error { typ := r.FormValue("type") slog.Info("Got Task Create", "library", library, "health", health, "type", typ) - rows, err := db.Query(r.Context(), "SELECT id, path, size, status, health, md5 FROM files where library_id = $1 AND status = $2 AND (-1 = $3 OR health = $3)", library, constants.FILE_STATUS_EXISTS, health) + rows, err := db.Query(r.Context(), "SELECT id, path, size, status, health, md5, updated_at FROM files where library_id = $1 AND status = $2 AND (-1 = $3 OR health = $3)", library, constants.FILE_STATUS_EXISTS, health) if err != nil { return fmt.Errorf("Query Files: %w", err) }