fix typescript errors and update dependencies

This commit is contained in:
itsrubberduck
2026-02-17 18:13:04 +01:00
parent d34fba5cba
commit 8f45c3397d
25 changed files with 3377 additions and 2583 deletions

View File

@@ -10,6 +10,8 @@ interface UpdatesRequestBody {
source?: string
}
type NotificationDataEntry = [string, ...unknown[]]
export default defineEventHandler(async (event) => {
const body = await readBody<UpdatesRequestBody>(event)
const email = body.email?.trim().toLowerCase()
@@ -38,7 +40,7 @@ export default defineEventHandler(async (event) => {
})
if (result.created) {
const dataEntries = [
const dataEntries: NotificationDataEntry[] = [
['Email', email],
['Name', name || null],
['Source', source],

View File

@@ -13,6 +13,8 @@ interface WaitlistRequestBody {
wantsProductUpdates?: boolean
}
type NotificationDataEntry = [string, ...unknown[]]
export default defineEventHandler(async (event) => {
const body = await readBody<WaitlistRequestBody>(event)
const email = body.email?.trim().toLowerCase()
@@ -57,7 +59,7 @@ export default defineEventHandler(async (event) => {
})
if (!previouslyWantedUpdates && updateResult.created) {
const dataEntries = [
const dataEntries: NotificationDataEntry[] = [
['Email', email],
]
if (name) {
@@ -107,7 +109,7 @@ export default defineEventHandler(async (event) => {
})
}
const dataEntries = [
const dataEntries: NotificationDataEntry[] = [
['Email', email],
]
if (name) {
@@ -132,4 +134,3 @@ export default defineEventHandler(async (event) => {
joinedAt: entry.joinedAt,
}
})