mirror of
https://github.com/samuelthomas2774/nxapi.git
synced 2026-09-07 19:05:09 -05:00
Add friend code lookup to API proxy
This commit is contained in:
@@ -97,8 +97,9 @@ export default class ZncProxyApi implements CoralApi {
|
||||
return {status: CoralStatus.OK as const, result: response.user, correlationId: ''};
|
||||
}
|
||||
|
||||
async getUserByFriendCode(friend_code: string, hash?: string): Promise<CoralSuccessResponse<FriendCodeUser>> {
|
||||
throw new Error('Not supported in ZncProxyApi');
|
||||
async getUserByFriendCode(friend_code: string, hash?: string) {
|
||||
const response = await this.fetch<{user: FriendCodeUser}>('/friendcode/' + friend_code);
|
||||
return {status: CoralStatus.OK as const, result: response.user, correlationId: ''};
|
||||
}
|
||||
|
||||
async sendFriendRequest(nsa_id: string): Promise<CoralSuccessResponse<{}>> {
|
||||
|
||||
Reference in New Issue
Block a user