mirror of
https://gitlab.com/comunic/comunicapiv2
synced 2025-06-20 08:35:17 +00:00
Can cancel a frienship request
This commit is contained in:
@ -114,6 +114,23 @@ export class FriendsHelper {
|
||||
}) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete a previously sent friendship request
|
||||
*
|
||||
* @param userID The ID of the user who have sent the request
|
||||
* @param targetUser The ID of the target user
|
||||
*/
|
||||
public static async RemoveRequest(userID: number, targetUser: number) {
|
||||
await DatabaseHelper.DeleteRows(
|
||||
FRIENDS_TABLE,
|
||||
{
|
||||
ID_personne: targetUser,
|
||||
ID_amis: userID,
|
||||
actif: 0
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Count the number of friendship requests a user
|
||||
* received
|
||||
|
Reference in New Issue
Block a user