refactor: add token to ping response message
This commit is contained in:
parent
26a6bda053
commit
d1c5bde5c1
|
@ -287,9 +287,11 @@ func (a AccountAPI) passwordResetConfirm(jc jape.Context) {
|
|||
}
|
||||
|
||||
func (a AccountAPI) ping(jc jape.Context) {
|
||||
token := middleware.GetAuthTokenFromContext(jc.Request.Context())
|
||||
account.EchoAuthCookie(jc, a.Name())
|
||||
jc.Encode(&PongResponse{
|
||||
Ping: "pong",
|
||||
Ping: "pong",
|
||||
Token: token,
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
@ -45,7 +45,8 @@ type PasswordResetVerifyRequest struct {
|
|||
}
|
||||
|
||||
type PongResponse struct {
|
||||
Ping string `json:"ping"`
|
||||
Ping string `json:"ping"`
|
||||
Token string `json:"token"`
|
||||
}
|
||||
type AccountInfoResponse struct {
|
||||
ID uint `json:"id"`
|
||||
|
|
|
@ -253,6 +253,8 @@ components:
|
|||
properties:
|
||||
ping:
|
||||
type: string
|
||||
token:
|
||||
type: string
|
||||
AccountInfoResponse:
|
||||
type: object
|
||||
properties:
|
||||
|
|
Loading…
Reference in New Issue