update logo POST route (#773)

The logo POST route now accepts a base64 encoded image instead of a path to an
image in the data folder. The route now saves the posted image to the data
folder, with the correct file type extension, and updates logo path in the
database appropriately.
This commit is contained in:
nebunez
2021-03-21 19:07:10 -04:00
committed by GitHub
parent 80579c5e7e
commit 826aa3f158
2 changed files with 42 additions and 8 deletions

View File

@@ -155,7 +155,7 @@ func Start() error {
http.HandleFunc("/api/integrations/clients", middleware.RequireAccessToken(models.ScopeHasAdminAccess, controllers.GetConnectedClients))
// Logo path
http.HandleFunc("/api/admin/config/logo", middleware.RequireAdminAuth(admin.SetLogoPath))
http.HandleFunc("/api/admin/config/logo", middleware.RequireAdminAuth(admin.SetLogo))
// Server tags
http.HandleFunc("/api/admin/config/tags", middleware.RequireAdminAuth(admin.SetTags))