mirror of
https://gitlab.com/comunic/comunicapiv2
synced 2024-11-22 13:29:22 +00:00
Delete all user responses to surveys
This commit is contained in:
parent
30200b9301
commit
003eca2435
@ -450,6 +450,9 @@ export class AccountHelper {
|
|||||||
|
|
||||||
// Delete all user posts
|
// Delete all user posts
|
||||||
await PostsHelper.DeleteAllUser(userID);
|
await PostsHelper.DeleteAllUser(userID);
|
||||||
|
|
||||||
|
// Delete all responses of user to surveys
|
||||||
|
await SurveyHelper.DeleteAllUserResponses(userID);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// TODO : continue work
|
// TODO : continue work
|
||||||
|
@ -232,6 +232,17 @@ export class SurveyHelper {
|
|||||||
})).map(this.DBTosurveyResponse)
|
})).map(this.DBTosurveyResponse)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Delete all user responses to surveys
|
||||||
|
*
|
||||||
|
* @param userID Target user ID
|
||||||
|
*/
|
||||||
|
public static async DeleteAllUserResponses(userID: number) {
|
||||||
|
await DatabaseHelper.DeleteRows(SURVEY_RESPONSE_TABLE, {
|
||||||
|
ID_utilisateurs: userID
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Turn a database entry into a survey object
|
* Turn a database entry into a survey object
|
||||||
|
Loading…
Reference in New Issue
Block a user