diff --git a/handler/htmx/artifact.go b/handler/htmx/artifact.go index b75eedf5..0962f027 100644 --- a/handler/htmx/artifact.go +++ b/handler/htmx/artifact.go @@ -439,7 +439,8 @@ func RecordDateIssued(c echo.Context, db *sql.DB) error { } y, m, d := form.ValidDate(year, month, day) if !y || !m || !d { - return c.NoContent(http.StatusNoContent) + return badRequest(c, fmt.Errorf("%w, date failed to validate: Y %q %v ; M %q %v ; D %q %v ", + ErrFormat, year, y, month, m, day, d)) } if err := model.UpdateDateIssued(db, int64(id), year, month, day); err != nil { return badRequest(c, err) diff --git a/model/insert.go b/model/insert.go index bdc85fca..d0095d6c 100644 --- a/model/insert.go +++ b/model/insert.go @@ -7,7 +7,6 @@ import ( "database/sql" "fmt" "net/url" - "os" "time" "github.com/Defacto2/server/handler/pouet" @@ -107,7 +106,6 @@ func InsertUpload(ctx context.Context, tx *sql.Tx, values url.Values, key string if err != nil { return 0, noID, fmt.Errorf("upload: %w", err) } - fmt.Fprintf(os.Stderr, "\ninsert upload f.Insert: %+v\n", f) if err = f.Insert(ctx, tx, boil.Infer()); err != nil { return 0, noID, fmt.Errorf("insert upload key %q: %w", key, err) } diff --git a/view/app/artifactedit.tmpl b/view/app/artifactedit.tmpl index c015bb79..98ebab13 100644 --- a/view/app/artifactedit.tmpl +++ b/view/app/artifactedit.tmpl @@ -326,7 +326,7 @@ aria-labelledby="artifact-delete-forever-modal-label" aria-hidden="true"> hx-patch="/editor/date" hx-include="[name='artifact-editor-key'], [name='artifact-editor-year'], - [name='artifact-editor-year-resetter'] + [name='artifact-editor-year-resetter'], [name='artifact-editor-month'], [name='artifact-editor-day']">Save