diff --git a/apps/shelve/app/pages/app/admin/tests.vue b/apps/shelve/app/pages/app/admin/tests.vue new file mode 100644 index 00000000..0ae5eead --- /dev/null +++ b/apps/shelve/app/pages/app/admin/tests.vue @@ -0,0 +1,55 @@ + + + + + diff --git a/apps/shelve/app/utils/navigation.ts b/apps/shelve/app/utils/navigation.ts index 7baec5d3..5e2cd98c 100644 --- a/apps/shelve/app/utils/navigation.ts +++ b/apps/shelve/app/utils/navigation.ts @@ -58,6 +58,12 @@ export function getNavigation(where: Where): Navigation[] { icon: 'heroicons:users', title: 'Users', }, + { + name: 'Tests', + path: '/app/admin/tests', + icon: 'lucide:flask-conical', + title: 'Tests', + }, ] default: return [] diff --git a/apps/shelve/server/api/mail/welcome.ts b/apps/shelve/server/api/mail/welcome.ts new file mode 100644 index 00000000..866ab05e --- /dev/null +++ b/apps/shelve/server/api/mail/welcome.ts @@ -0,0 +1,12 @@ +import type { H3Event } from 'h3' +import { EmailService } from '~~/server/services/resend.service' + +export default defineEventHandler(async (event: H3Event) => { + const { email, username } = await readBody(event) + const emailService = new EmailService() + await emailService.sendWelcomeEmail(email, username) + return { + statusCode: 200, + message: 'Email sent', + } +}) diff --git a/apps/shelve/server/emails/welcomeEmail.vue b/apps/shelve/server/emails/welcomeEmail.vue index 925c03a0..d27fd0c4 100644 --- a/apps/shelve/server/emails/welcomeEmail.vue +++ b/apps/shelve/server/emails/welcomeEmail.vue @@ -51,11 +51,6 @@ defineProps({ roadmap to see what's coming next. - - 3. Join our - community - to connect with other users and share your experiences. - 4. Start a new project and invite your team members to collaborate. diff --git a/apps/shelve/server/services/resend.service.ts b/apps/shelve/server/services/resend.service.ts index 5c518b48..d1e0825b 100644 --- a/apps/shelve/server/services/resend.service.ts +++ b/apps/shelve/server/services/resend.service.ts @@ -79,7 +79,7 @@ export class EmailService { redirectUrl: this.siteUrl, }) } catch (error) { - return `

Welcome to Shelve, ${username}!

` + return `

Welcome to Shelve, ${username || email}!

` } }