(app *App, alias string, w http.ResponseWriter, r *http.Request)
| 1422 | } |
| 1423 | |
| 1424 | func 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 | |
| 1440 | func handleLogOutCollection(app *App, w http.ResponseWriter, r *http.Request) error { |
| 1441 | alias := collectionAliasFromReq(r) |
no outgoing calls
no test coverage detected