feat(revisions): add handling account deletion requests

This commit is contained in:
Karol Sójko
2022-11-28 12:42:25 +01:00
parent 84e436265e
commit b4e8971ad2
6 changed files with 86 additions and 0 deletions
@@ -13,6 +13,15 @@ export class MySQLRevisionRepository implements RevisionRepositoryInterface {
private revisionMapper: MapperInterface<Revision, TypeORMRevision>,
) {}
async removeByUserUuid(userUuid: Uuid): Promise<void> {
await this.ormRepository
.createQueryBuilder()
.delete()
.from('revisions')
.where('user_uuid = :userUuid', { userUuid })
.execute()
}
async removeOneByUuid(revisionUuid: Uuid, userUuid: Uuid): Promise<void> {
await this.ormRepository
.createQueryBuilder()