Audit changes.
This commit is contained in:
1 parent
0cd5982a3f
commit
8983c0d651
4 files changed
+19
-7
No files matched your search
+2
-2
@@ -35,7 +35,7 @@ func (app *App) handlePub(pattern string, fn handlerFunc) {
|
||||
|
||||
func (app *App) handleNotSignedIn(pattern string, fn handlerFunc) {
|
||||
app.handlePub(pattern, func(s *api.Session, w http.ResponseWriter, r *http.Request) error {
|
||||
if s.SignedIn {
|
||||
if s.SessionID != "" {
|
||||
http.Redirect(w, r, "/", http.StatusSeeOther)
|
||||
return nil
|
||||
}
|
||||
@@ -45,7 +45,7 @@ func (app *App) handleNotSignedIn(pattern string, fn handlerFunc) {
|
||||
|
||||
func (app *App) handleSignedIn(pattern string, fn handlerFunc) {
|
||||
app.handlePub(pattern, func(s *api.Session, w http.ResponseWriter, r *http.Request) error {
|
||||
if !s.SignedIn {
|
||||
if s.SessionID == "" {
|
||||
http.Redirect(w, r, "/", http.StatusSeeOther)
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user