invite management
This commit is contained in:
parent
d1cf9f4c66
commit
c66c847ec1
6 changed files with 87 additions and 20 deletions
|
@ -37,7 +37,7 @@ export default abstract class InviteCommandHandler {
|
|||
|
||||
/**
|
||||
* @description delete invite by mail and token
|
||||
* @param DeleteRefreshCommand
|
||||
* @param DeleteInviteCommand
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
static async deleteByTokenAndMail(deleteInvite: DeleteInviteCommand): Promise<any> {
|
||||
|
@ -53,4 +53,22 @@ export default abstract class InviteCommandHandler {
|
|||
throw new InternalException("failed invite removal", err);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @description delete invite by mail
|
||||
* @param DeleteByMailInviteCommand
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
static async deleteByMail(mail: string): Promise<any> {
|
||||
return await dataSource
|
||||
.createQueryBuilder()
|
||||
.delete()
|
||||
.from(invite)
|
||||
.where("invite.mail = :mail", { mail })
|
||||
.execute()
|
||||
.then((res) => {})
|
||||
.catch((err) => {
|
||||
throw new InternalException("failed invite removal", err);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue