fix: technical debts left by the Sites, Authors and SEO slices, plus backend support for the new Sites and Authors pagination

This commit is contained in:
Florian Sylvain committed 2026-10-19 00:25:31 +02:00
1 parent 9f4ce426a8
commit daf3594316
86 files changed
+4223 -1485

No files matched your search

+13
View File
@@ -250,6 +250,19 @@ func (h *Handler) List(w http.ResponseWriter, r *http.Request) {
writeJSON(w, http.StatusOK, response)
}
func (h *Handler) Get(w http.ResponseWriter, r *http.Request) {
id, ok := parseImageId(w, r)
if !ok {
return
}
item, err := h.ListUseCase.Get(id)
if err != nil {
writeImageError(w, err)
return
}
writeJSON(w, http.StatusOK, toResponse(item))
}
func (h *Handler) Upload(w http.ResponseWriter, r *http.Request) {
userId, _ := claims.UserId(r)
input, closeFile, ok := upload.ReadImageInput(w, r, userId)