feat: add param to disable img resizing

This commit is contained in:
Oleg Lobanov committed 2020-07-27 19:26:44 +02:00
1 parent bc00165094
commit aa78e3ab1f
7 files changed
+42 -28

No files matched your search

+2 -1
View File
@@ -59,7 +59,8 @@ func NewHandler(imgSvc ImgService, store *storage.Storage, server *settings.Serv
api.Handle("/settings", monkey(settingsPutHandler, "")).Methods("PUT")
api.PathPrefix("/raw").Handler(monkey(rawHandler, "/api/raw")).Methods("GET")
api.PathPrefix("/preview/{size}/{path:.*}").Handler(monkey(previewHandler(imgSvc), "/api/preview")).Methods("GET")
api.PathPrefix("/preview/{size}/{path:.*}").
Handler(monkey(previewHandler(imgSvc, server.EnableThumbnails, server.ResizePreview), "/api/preview")).Methods("GET")
api.PathPrefix("/command").Handler(monkey(commandsHandler, "/api/command")).Methods("GET")
api.PathPrefix("/search").Handler(monkey(searchHandler, "/api/search")).Methods("GET")