plugins: migrate usage of deprecated IdentityApi methods
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
@@ -121,6 +121,7 @@ export class BazaarClient implements BazaarApi {
|
||||
|
||||
async addMember(id: number, userId: string): Promise<void> {
|
||||
const baseUrl = await this.discoveryApi.getBaseUrl('bazaar');
|
||||
const { picture } = await this.identityApi.getProfileInfo();
|
||||
|
||||
await fetch(
|
||||
`${baseUrl}/projects/${encodeURIComponent(
|
||||
@@ -132,9 +133,7 @@ export class BazaarClient implements BazaarApi {
|
||||
Accept: 'application/json',
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
body: JSON.stringify({
|
||||
picture: (await this.identityApi.getProfileInfo()).picture,
|
||||
}),
|
||||
body: JSON.stringify({ picture }),
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user