MCPcopy Index your code
hub / github.com/dnote/dnote / V3Logout

Method V3Logout

pkg/server/controllers/users.go:275–287  ·  view source on GitHub ↗

V3Logout handles logout via API

(w http.ResponseWriter, r *http.Request)

Source from the content-addressed store, hash-verified

273
274// V3Logout handles logout via API
275func (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
289type createResetTokenPayload struct {
290 Email string `schema:"email" json:"email"`

Callers

nothing calls this directly

Calls 4

logoutMethod · 0.95
handleJSONErrorFunction · 0.85
unsetSessionCookieFunction · 0.85
WriteHeaderMethod · 0.80

Tested by

no test coverage detected