feat(gallery): routes

This commit is contained in:
2026-05-31 10:46:07 +02:00
parent ee3eba3cd9
commit 9282f1f634
22 changed files with 223 additions and 34 deletions
+6
View File
@@ -1,6 +1,8 @@
package resthome
import (
"context"
"errors"
"fmt"
"net/http"
@@ -24,6 +26,10 @@ func (h *Handler) page(w http.ResponseWriter, r *http.Request) {
page, err := h.src.GetPage(r.Context(), uid)
if err != nil {
if errors.Is(err, context.Canceled) {
w.WriteHeader(http.StatusRequestTimeout)
}
w.WriteHeader(http.StatusInternalServerError)
return
}