Suchitk
Suchitk
WWasp-lang
Created by Suchitk on 8/19/2024 in #đŸ™‹questions
Wasp emailSender.send set CC recipients
Using the Wasp emailSender.send method, I can specify the from and to email addresses. Is it also possible to include CC recipients?
4 replies
WWasp-lang
Created by Suchitk on 6/24/2024 in #đŸ™‹questions
How to add custom Sign up field that refers another entity
I am trying to create a custom sign up where a User can select college and university through a drop down. This is my defineUserSignupFields method call:
export const getEmailUserFields = defineUserSignupFields({
username: (data: any) => data.email,
isAdmin: (data: any) => adminEmails.includes(data.email),
email: (data: any) => data.email,
firstName: (data: any) => data.firstName,
lastName: (data: any) => data.lastName,
academicYearLevel: (data: any) => data.academicYearLevel,
university: (data: any) => ({
connect: { id: data.universityId } // Assuming `universityId` is the ID of the selected university
}),
college: (data: any) => ({
connect: { id: data.collegeId } // Assuming `collegeId` is the ID of the selected college
}),
});
export const getEmailUserFields = defineUserSignupFields({
username: (data: any) => data.email,
isAdmin: (data: any) => adminEmails.includes(data.email),
email: (data: any) => data.email,
firstName: (data: any) => data.firstName,
lastName: (data: any) => data.lastName,
academicYearLevel: (data: any) => data.academicYearLevel,
university: (data: any) => ({
connect: { id: data.universityId } // Assuming `universityId` is the ID of the selected university
}),
college: (data: any) => ({
connect: { id: data.collegeId } // Assuming `collegeId` is the ID of the selected college
}),
});
All of these attributes exist in my User entity however I get this error: Unknown arg university in data.university for type UserUncheckedCreateInput. Did you mean universityId? trying to use universityId/collegeId instead of university/college yields the same error but with typ UserCreateInput
13 replies