Use correct endpoint to lookup by username

This commit is contained in:
Fedor Indutny 2022-10-19 13:41:47 -07:00 committed by GitHub
parent 85f706d48f
commit f5e94f2069
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 9 deletions

View file

@ -143,15 +143,15 @@ async function checkForUsername(
}
try {
const profile = await server.getProfileForUsername(username);
const account = await server.getAccountForUsername(username);
if (!profile.uuid) {
log.error("checkForUsername: Returned profile didn't include a uuid");
if (!account.uuid) {
log.error("checkForUsername: Returned account didn't include a uuid");
return;
}
return {
uuid: UUID.cast(profile.uuid),
uuid: UUID.cast(account.uuid),
username,
};
} catch (error) {