mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
session response 200 on login & logout.
This commit is contained in:
parent
57ed35552f
commit
dabda571d4
@ -46,7 +46,11 @@ func (api *ApiManagerCtx) Login(w http.ResponseWriter, r *http.Request) {
|
|||||||
HttpOnly: true,
|
HttpOnly: true,
|
||||||
})
|
})
|
||||||
|
|
||||||
utils.HttpSuccess(w)
|
utils.HttpSuccess(w, SessionWhoamiPayload{
|
||||||
|
ID: session.ID(),
|
||||||
|
Profile: session.GetProfile(),
|
||||||
|
State: session.GetState(),
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
func (api *ApiManagerCtx) Logout(w http.ResponseWriter, r *http.Request) {
|
func (api *ApiManagerCtx) Logout(w http.ResponseWriter, r *http.Request) {
|
||||||
@ -66,7 +70,7 @@ func (api *ApiManagerCtx) Logout(w http.ResponseWriter, r *http.Request) {
|
|||||||
HttpOnly: true,
|
HttpOnly: true,
|
||||||
})
|
})
|
||||||
|
|
||||||
utils.HttpSuccess(w)
|
utils.HttpSuccess(w, true)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (api *ApiManagerCtx) Whoami(w http.ResponseWriter, r *http.Request) {
|
func (api *ApiManagerCtx) Whoami(w http.ResponseWriter, r *http.Request) {
|
||||||
|
Loading…
Reference in New Issue
Block a user