mirror of
https://gitlab.com/comunic/comunicapiv2
synced 2024-11-22 13:29:22 +00:00
Can delete all the likes of a given user
This commit is contained in:
parent
003eca2435
commit
df2d2b66be
@ -453,6 +453,9 @@ export class AccountHelper {
|
|||||||
|
|
||||||
// Delete all responses of user to surveys
|
// Delete all responses of user to surveys
|
||||||
await SurveyHelper.DeleteAllUserResponses(userID);
|
await SurveyHelper.DeleteAllUserResponses(userID);
|
||||||
|
|
||||||
|
// Delete all the likes created by the user
|
||||||
|
await LikesHelper.DeleteAllUser(userID);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// TODO : continue work
|
// TODO : continue work
|
||||||
|
@ -135,6 +135,17 @@ export class LikesHelper {
|
|||||||
})).map(this.DBToUserLike);
|
})).map(this.DBToUserLike);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Delete all the likes of a given user
|
||||||
|
*
|
||||||
|
* @param userID Target user ID
|
||||||
|
*/
|
||||||
|
public static async DeleteAllUser(userID: number) {
|
||||||
|
await DatabaseHelper.DeleteRows(LIKES_TABLE, {
|
||||||
|
ID_personne: userID
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Turn a database entry into a like entry
|
* Turn a database entry into a like entry
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user