chore: rename context name

This commit is contained in:
Steven
2023-09-17 16:21:11 +08:00
parent 75d152922e
commit 6cb493b4a1
8 changed files with 23 additions and 23 deletions

View File

@ -32,7 +32,7 @@ func (s *APIV1Service) registerRedirectorRoutes(g *echo.Group) {
return echo.NewHTTPError(http.StatusNotFound, fmt.Sprintf("not found shortcut with name: %s", shortcutName))
}
if shortcut.Visibility != storepb.Visibility_PUBLIC {
userID, ok := c.Get(UserIDContextKey).(int32)
userID, ok := c.Get(userIDContextKey).(int32)
if !ok {
return echo.NewHTTPError(http.StatusUnauthorized, "Unauthorized")
}