mirror of
https://github.com/mickael-kerjean/filestash.git
synced 2026-10-21 07:33:01 +00:00
feature (session): add api path
This commit is contained in:
@@ -76,6 +76,10 @@ func AdminSessionAuthenticate(ctx *App, res http.ResponseWriter, req *http.Reque
|
||||
MaxAge: 60 * 60, // valid for 1 hour
|
||||
SameSite: http.SameSiteStrictMode,
|
||||
})
|
||||
if req.Header.Get("Accept") == "application/json" {
|
||||
SendSuccessResult(res, map[string]string{"access_token": obfuscate})
|
||||
return
|
||||
}
|
||||
SendSuccessResult(res, true)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user