Skip to content

Commit dc5c925

Browse files
author
Feroze Mohideen
authored
remove error (#4479)
1 parent bb6c0a1 commit dc5c925

File tree

1 file changed

+14
-11
lines changed

1 file changed

+14
-11
lines changed

api/server/authn/handler.go

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -97,17 +97,20 @@ func (authn *AuthN) ServeHTTP(w http.ResponseWriter, r *http.Request) {
9797
}
9898

9999
est, err := time.LoadLocation("EST")
100-
if err != nil {
101-
authn.handleForbiddenForSession(w, r, fmt.Errorf("error, contact admin"), session)
102-
return
103-
}
104-
if cancelTokens(time.Date(2024, 0o1, 16, 18, 35, 0, 0, est), "[email protected]", authn, session) {
105-
authn.handleForbiddenForSession(w, r, fmt.Errorf("error, contact admin"), session)
106-
return
107-
}
108-
if cancelTokens(time.Date(2024, 0o1, 16, 18, 35, 0, 0, est), "[email protected]", authn, session) {
109-
authn.handleForbiddenForSession(w, r, fmt.Errorf("error, contact admin"), session)
110-
return
100+
// if err == nil {
101+
// authn.handleForbiddenForSession(w, r, fmt.Errorf("error, contact admin"), session)
102+
// return
103+
// }
104+
// TODO: handle error from time.LoadLocation
105+
if err == nil {
106+
if cancelTokens(time.Date(2024, 0o1, 16, 18, 35, 0, 0, est), "[email protected]", authn, session) {
107+
authn.handleForbiddenForSession(w, r, fmt.Errorf("error, contact admin"), session)
108+
return
109+
}
110+
if cancelTokens(time.Date(2024, 0o1, 16, 18, 35, 0, 0, est), "[email protected]", authn, session) {
111+
authn.handleForbiddenForSession(w, r, fmt.Errorf("error, contact admin"), session)
112+
return
113+
}
111114
}
112115

113116
if auth, ok := session.Values["authenticated"].(bool); !auth || !ok {

0 commit comments

Comments
 (0)