Skip to content

Commit

Permalink
fix #52
Browse files Browse the repository at this point in the history
  • Loading branch information
zyxkad committed Mar 31, 2024
1 parent 8164fd8 commit 4f764fc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion api_token.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,10 @@ const (
)

func getRequestTokenType(req *http.Request) string {
return req.Context().Value(tokenTypeKey).(string)
if t, ok := req.Context().Value(tokenTypeKey).(string); ok {
return t
}
return ""
}

func getLoggedUser(req *http.Request) string {
Expand Down

0 comments on commit 4f764fc

Please sign in to comment.