Skip to content

Commit

Permalink
Fix a bug, can not get repo details as collaborators
Browse files Browse the repository at this point in the history
This solve #118.
  • Loading branch information
Kaiser-Yang committed Feb 27, 2025
1 parent 4b95d82 commit 89953f7
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -189,9 +189,9 @@ public RepositoryVO getRepository(
if (repository == null) {
throw new GenericException(ErrorCodeEnum.REPOSITORY_NOT_FOUND, notFoundMessage);
}
String idInToken = JwtUtil.getId(accessToken);
Long idInToken = Long.valueOf(JwtUtil.getId(accessToken));
if (repository.getIsPrivate()
&& !idInToken.equals(repository.getUserId().toString())
&& !idInToken.equals(repository.getUserId())
&& userCollaborateRepositoryService.getOne(
new QueryWrapper<UserCollaborateRepositoryPO>()
.eq("collaborator_id", idInToken)
Expand Down

0 comments on commit 89953f7

Please sign in to comment.