implement redis cache for context
This commit is contained in:
@@ -56,7 +56,7 @@ export class CenterMentorSchema extends PothosSchema {
|
||||
@Pothos()
|
||||
init(): void {
|
||||
this.builder.queryFields((t) => ({
|
||||
centerMentor: t.prismaField({
|
||||
centerMentors: t.prismaField({
|
||||
description:
|
||||
'Retrieve a list of center mentors with optional filtering, ordering, and pagination.',
|
||||
type: [this.centerMentor()],
|
||||
@@ -159,7 +159,7 @@ export class CenterMentorSchema extends PothosSchema {
|
||||
const inviteUrl = `${process.env.CENTER_BASE_URL}/invite?token=${token}`;
|
||||
// mail to user with params centerId, email
|
||||
await this.mailService.sendTemplateEmail(
|
||||
args.email,
|
||||
[args.email],
|
||||
'Invite to center',
|
||||
'MentorInvitation',
|
||||
{
|
||||
@@ -189,7 +189,7 @@ export class CenterMentorSchema extends PothosSchema {
|
||||
const inviteUrl = `${process.env.CENTER_BASE_URL}/invite?token=${token}`;
|
||||
// mail to user with params centerId, email
|
||||
await this.mailService.sendTemplateEmail(
|
||||
args.email,
|
||||
[args.email],
|
||||
'Invite to center',
|
||||
'MentorInvitation',
|
||||
{
|
||||
@@ -251,7 +251,7 @@ export class CenterMentorSchema extends PothosSchema {
|
||||
if (args.approved) {
|
||||
// send mail to user
|
||||
await this.mailService.sendTemplateEmail(
|
||||
email.email,
|
||||
[email.email],
|
||||
'Thông báo về việc được chấp nhận làm mentor',
|
||||
'MentorApproved',
|
||||
{
|
||||
@@ -291,7 +291,7 @@ export class CenterMentorSchema extends PothosSchema {
|
||||
}
|
||||
// if rejected, update adminNote
|
||||
await this.mailService.sendTemplateEmail(
|
||||
email.email,
|
||||
[email.email],
|
||||
'Thông báo về việc không được chấp nhận làm mentor',
|
||||
'MentorRejected',
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user