Skip to content

Commit

Permalink
Update emails.ts
Browse files Browse the repository at this point in the history
events在hasura console的EVENTS中定义,是一个trigger,目前设定的是在row insert时自动发送,payload的结构详见 https://hasura.io/docs/latest/event-triggers/payload/
  • Loading branch information
xiangmy21 authored May 29, 2024
1 parent b7fbaf3 commit 98f4f7b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/routes/emails.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ router.post("/events", hasura, async (req, res) => {
switch (table) {
case "mentor_application": {
try {
const studentId = data.student_id;
const mentorId = data.mentor_id;
const studentId = data.student_uuid;
const mentorId = data.mentor_uuid;
let response: any = await client.request(
gql`
query GetUserName($uuid: String!) {
users(where: { uuid: { _eq: $uuid } }) {
name
realname
}
}
`,
Expand All @@ -42,7 +42,7 @@ router.post("/events", hasura, async (req, res) => {
gql`
query GetUserNameEmail($uuid: String!) {
users(where: { uuid: { _eq: $uuid } }) {
name
realname
email
}
}
Expand Down Expand Up @@ -70,7 +70,7 @@ router.post("/events", hasura, async (req, res) => {
newMentorApplicationTemplate(
mentorName,
studentName,
"https://eesast.com/info/mentor-applications"
"https://eesast.com/#/info/mentor-applications"
)
);
break;
Expand Down

0 comments on commit 98f4f7b

Please sign in to comment.