Started trying out reading Excel files

This commit is contained in:
Tiago Ribeiro
2024-01-11 13:55:37 +00:00
parent fd1af3efee
commit f79857fabe
8 changed files with 213 additions and 29 deletions

View File

@@ -37,8 +37,9 @@ async function register(req: NextApiRequest, res: NextApiResponse) {
}
async function registerIndividual(req: NextApiRequest, res: NextApiResponse) {
const {email, password, code} = req.body as {
const {email, passport_id, password, code} = req.body as {
email: string;
passport_id?: string;
password: string;
code?: string;
};
@@ -67,6 +68,7 @@ async function registerIndividual(req: NextApiRequest, res: NextApiResponse) {
focus: "academic",
type: email.endsWith("@ecrop.dev") ? "developer" : codeData ? codeData.type : "student",
subscriptionExpirationDate: codeData ? codeData.expiryDate : moment().subtract(1, "days").toISOString(),
...(passport_id ? {demographicInformation: {passport_id}} : {}),
registrationDate: new Date(),
status: code ? "active" : "paymentDue",
};