feat: add param to disable img resizing

This commit is contained in:
Oleg Lobanov 2020-07-23 12:38:03 +02:00
parent bc00165094
commit aa78e3ab1f
No known key found for this signature in database
GPG key ID: 7CC64E41212621B0
7 changed files with 42 additions and 28 deletions

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")