Skip to content

Commit a1f9481

Browse files
committed
Fix format
1 parent 6098800 commit a1f9481

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

modules/lfs/server.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -526,19 +526,19 @@ func parseToken(authorization string) (*models.User, *models.Repository, string,
526526
if !ok {
527527
return nil, nil, "unknown", fmt.Errorf("Token operation invalid")
528528
}
529-
repoID, ok := claims["repo"].(int64)
529+
repoID, ok := claims["repo"].(float64)
530530
if !ok {
531531
return nil, nil, opStr, fmt.Errorf("Token repository id invalid")
532532
}
533-
r, err := models.GetRepositoryByID(repoID)
533+
r, err := models.GetRepositoryByID(int64(repoID))
534534
if err != nil {
535535
return nil, nil, opStr, err
536536
}
537-
userID, ok := claims["user"].(int64)
537+
userID, ok := claims["user"].(float64)
538538
if !ok {
539539
return nil, r, opStr, fmt.Errorf("Token user id invalid")
540540
}
541-
u, err := models.GetUserByID(userID)
541+
u, err := models.GetUserByID(int64(userID))
542542
if err != nil {
543543
return nil, r, opStr, err
544544
}

0 commit comments

Comments
 (0)