Pretty all the things I missed

My laptop didn't have lefthook running. Oops.
This commit is contained in:
Eli Ribble 2026-03-27 14:06:50 -07:00
parent f60bde7fd9
commit 4bbfbdb9e6
No known key found for this signature in database
30 changed files with 490 additions and 487 deletions

View file

@ -119,7 +119,7 @@ func handlerJSONPost[ReqType any](f handlerFunctionPost[ReqType]) http.HandlerFu
ctx := r.Context()
path, e := f(ctx, r, *req)
if e != nil {
return
return
}
http.Redirect(w, r, path, http.StatusFound)
}
@ -128,6 +128,7 @@ func handlerJSONPost[ReqType any](f handlerFunctionPost[ReqType]) http.HandlerFu
type postMultipartResponse struct {
URI string `json:"uri"`
}
func authenticatedHandlerPostMultipart(f handlerFunctionPostAuthenticated[[]file.Upload], collection file.Collection) http.Handler {
return auth.NewEnsureAuth(func(w http.ResponseWriter, r *http.Request, u platform.User) {
err := r.ParseMultipartForm(32 << 10) // 32 MB buffer
@ -142,11 +143,11 @@ func authenticatedHandlerPostMultipart(f handlerFunctionPostAuthenticated[[]file
}
/*
err = decoder.Decode(&content, r.PostForm)
if err != nil {
respondError(w, http.StatusBadRequest, "Failed to decode form: %w", err)
return
}
err = decoder.Decode(&content, r.PostForm)
if err != nil {
respondError(w, http.StatusBadRequest, "Failed to decode form: %w", err)
return
}
*/
ctx := r.Context()
path, e := f(ctx, r, u, uploads)