core: use postinit status code

This commit is contained in:
2024-01-08 20:57:43 +01:00
parent 6f9903e309
commit 476ed0b833
12 changed files with 87 additions and 89 deletions

View File

@ -20,15 +20,15 @@ class Profiles
let profiles = []
response_data.forEach((profile) => {
profiles.push(new Profile(this.client, profile.username, profile.avatar_url, profile.user_id))
profiles.push(new Profile(this.client, profile.user_id, profile.username, profile.avatar_url))
});
return profiles;
}
async getProfile(user_id)
{
let profile = new Profile(this.client);
if (await profile.init(user_id))
let profile = new Profile(this.client, user_id);
if (await profile.init())
return null;
return profile;
}