Skip to content

Commit 9b4c5b7

Browse files
fix: Don't fall back to Mod Garden if another service is specified.
1 parent ed0ede3 commit 9b4c5b7

File tree

1 file changed

+6
-8
lines changed
  • src/main/java/net/modgarden/backend/data/profile

1 file changed

+6
-8
lines changed

src/main/java/net/modgarden/backend/data/profile/User.java

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -100,18 +100,16 @@ public static User query(String path,
100100
if (user == null)
101101
user = queryFromModrinthId(path);
102102
return user;
103-
}
104-
105-
if ("discord".equalsIgnoreCase(service)) {
103+
} else if ("discord".equalsIgnoreCase(service)) {
106104
user = queryFromDiscordUsername(path.toLowerCase(Locale.ROOT));
107105
if (user == null)
108106
user = queryFromDiscordId(path);
109107
return user;
110-
}
111-
112-
user = queryFromUsername(path);
113-
if (user == null)
114-
user = queryFromId(path);
108+
} else {
109+
user = queryFromUsername(path);
110+
if (user == null)
111+
user = queryFromId(path);
112+
}
115113
return user;
116114
}
117115

0 commit comments

Comments
 (0)