Commit e09f9b1 1 parent c60bfb3 commit e09f9b1 Copy full SHA for e09f9b1
File tree 1 file changed +1
-13
lines changed
1 file changed +1
-13
lines changed Original file line number Diff line number Diff line change 1
1
package authentication
2
2
3
3
import (
4
- "errors"
5
- "net/http"
6
-
7
- "github.com/getsentry/sentry-go"
8
4
"github.com/gin-gonic/gin"
9
- "github.com/google/logger"
10
5
"github.com/partyoffice/spotifete/database/model"
11
6
)
12
7
@@ -30,14 +25,7 @@ func GetValidSessionFromCookie(c *gin.Context) *model.LoginSession {
30
25
31
26
func GetSessionIdFromCookie (c * gin.Context ) * string {
32
27
sessionId , err := c .Cookie (sessionCookieName )
33
- if err != nil {
34
- if ! errors .As (err , & http .ErrNoCookie ) {
35
- logger .Error ("Could not get error from context" , err )
36
- sentry .CaptureException (err )
37
- }
38
-
39
- return nil
40
- } else if sessionId == "" {
28
+ if err != nil || sessionId == "" {
41
29
return nil
42
30
}
43
31
You can’t perform that action at this time.
0 commit comments