aboutsummaryrefslogtreecommitdiff
path: root/internal/api/new.go
diff options
context:
space:
mode:
authorRanXom <saiyedshizain@gmail.com>2026-07-13 18:52:32 +0530
committerRanXom <saiyedshizain@gmail.com>2026-07-13 18:52:55 +0530
commit87c5ba8c5f859fd26a038f6a704e856167c78758 (patch)
tree471eb0ff7a729fffbc53495781ef428d7986ddf5 /internal/api/new.go
parentfdf1148db3c37d1be83ea4d52ac370c5da9593a4 (diff)
downloadgalleryd-87c5ba8c5f859fd26a038f6a704e856167c78758.tar.xz
galleryd-87c5ba8c5f859fd26a038f6a704e856167c78758.zip
feat(api): serve cached thumbnails
Diffstat (limited to 'internal/api/new.go')
-rw-r--r--internal/api/new.go9
1 files changed, 7 insertions, 2 deletions
diff --git a/internal/api/new.go b/internal/api/new.go
index 7066d90..e2399e5 100644
--- a/internal/api/new.go
+++ b/internal/api/new.go
@@ -16,8 +16,8 @@ func New(config Config) *Server {
mux: mux,
http: server,
- gallery: config.Gallery,
- thumbnail: config.Thumbnails,
+ gallery: config.Gallery,
+ thumbnails: config.Thumbnails,
}
srv.mux.HandleFunc(
@@ -30,5 +30,10 @@ func New(config Config) *Server {
srv.handlePhotos,
)
+ srv.mux.HandleFunc(
+ "GET /thumb/{id}",
+ srv.handleThumbnail,
+ )
+
return srv
}