update invite center staff

This commit is contained in:
2024-10-27 19:47:50 +07:00
parent a5e9ad5ac1
commit ef89372e8c
10 changed files with 52 additions and 24 deletions

View File

@@ -239,7 +239,15 @@ export class UserSchema extends PothosSchema {
to: t.arg({ type: 'String', required: true }),
},
resolve: async (_parent, args, _context, _info) => {
await this.mailService.sendEmail(args.to, 'Test', 'Test');
await this.mailService.sendTemplateEmail(
args.to,
'Bạn đã được mời làm việc tại Trung tâm băng đĩa lậu hải ngoại',
'StaffInvitation',
{
center_name: 'băng đĩa lậu hải ngoại',
invite_url: 'https://epess.org',
},
);
return 'Email sent';
},
}),