fix task creation
This commit is contained in:
parent
c04aa74364
commit
8759e9bafc
1 changed files with 2 additions and 2 deletions
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue