MCPcopy Index your code
hub / github.com/writefreely/writefreely / logOutCollection

Function logOutCollection

collections.go:1424–1438  ·  view source on GitHub ↗
(app *App, alias string, w http.ResponseWriter, r *http.Request)

Source from the content-addressed store, hash-verified

1422}
1423
1424func logOutCollection(app *App, alias string, w http.ResponseWriter, r *http.Request) error {
1425 session, err := app.sessionStore.Get(r, blogPassCookieName)
1426 if err != nil {
1427 return err
1428 }
1429
1430 // Remove this from map of blogs logged into
1431 delete(session.Values, alias)
1432
1433 // If not auth'd with any blog, delete entire cookie
1434 if len(session.Values) == 0 {
1435 session.Options.MaxAge = -1
1436 }
1437 return session.Save(r, w)
1438}
1439
1440func handleLogOutCollection(app *App, w http.ResponseWriter, r *http.Request) error {
1441 alias := collectionAliasFromReq(r)

Callers 1

handleLogOutCollectionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected