Add friend code URL to API proxy

This commit is contained in:
Samuel Elliott
2022-07-28 14:04:29 +01:00
parent 0cc39aad13
commit e9218b9004
2 changed files with 47 additions and 3 deletions

View File

@@ -111,8 +111,9 @@ export default class ZncProxyApi implements CoralApi {
return {status: CoralStatus.OK as const, result: response.user, correlationId: ''};
}
async getFriendCodeUrl(): Promise<CoralSuccessResponse<FriendCodeUrl>> {
throw new Error('Not supported in ZncProxyApi');
async getFriendCodeUrl() {
const response = await this.fetch<{friendcode: FriendCodeUrl}>('/friendcode');
return {status: CoralStatus.OK as const, result: response.friendcode, correlationId: ''};
}
async getCurrentUserPermissions() {