updates to friend route, some changes to ui components, front end api tools

This commit is contained in:
Mikayla Dobson
2022-12-01 21:52:54 -06:00
parent 8a7eaa7db6
commit 2e48231dc5
10 changed files with 152 additions and 19 deletions

View File

@@ -64,6 +64,16 @@ export default class UserCtl {
}
}
async getPendingFriendRequests(senderid: string | number) {
try {
const { ok, code, result } = await UserInstance.getPendingFriendRequests(senderid);
if (ok) return result;
throw createError(code, result);
} catch (e: any) {
throw new Error(e);
}
}
async addFriendship(userid: number | string, targetid: number | string) {
try {
const result = await UserInstance.addFriendship(userid, targetid);