feature (session): add api path

This commit is contained in:
MickaelK
2026-03-16 12:32:13 +11:00
parent 8ed125de2d
commit 54efcef392
+4
View File
@@ -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)
}