V3Logout handles logout via API
(w http.ResponseWriter, r *http.Request)
| 273 | |
| 274 | // V3Logout handles logout via API |
| 275 | func (u *Users) V3Logout(w http.ResponseWriter, r *http.Request) { |
| 276 | ok, err := u.logout(r) |
| 277 | if err != nil { |
| 278 | handleJSONError(w, err, "logging out") |
| 279 | return |
| 280 | } |
| 281 | |
| 282 | if ok { |
| 283 | unsetSessionCookie(w) |
| 284 | } |
| 285 | |
| 286 | w.WriteHeader(http.StatusNoContent) |
| 287 | } |
| 288 | |
| 289 | type createResetTokenPayload struct { |
| 290 | Email string `schema:"email" json:"email"` |
nothing calls this directly
no test coverage detected