updates to friend route, some changes to ui components, front end api tools
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user