Skip to content

Commit c6d7604

Browse files
authored
Merge pull request #29 from china-wangyu/fix/avatarUrl
fix:修复用户头像为null的问题
2 parents 644d495 + 7121506 commit c6d7604

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/main/java/io/github/talelin/merak/common/interceptor/AuthorizeVerifyResolverImpl.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,9 @@ private boolean getClaim(Map<String, Claim> claims) {
125125
throw new NotFoundException("user is not found", 10021);
126126
}
127127
String avatarUrl;
128-
if (user.getAvatar().startsWith("http")) {
128+
if (user.getAvatar() == null) {
129+
avatarUrl = null;
130+
} else if (user.getAvatar().startsWith("http")) {
129131
avatarUrl = user.getAvatar();
130132
} else {
131133
avatarUrl = domain + servePath.split("/")[0] + "/" + user.getAvatar();

0 commit comments

Comments
 (0)