Add forgot username/password endpoints that send emails, reset password endpoint will be done next

This commit is contained in:
2026-01-23 20:04:17 -07:00
parent 35d6c5b307
commit ceace4ad8c
9 changed files with 543 additions and 1 deletions

View File

@@ -74,6 +74,16 @@ export const verifyCodes = mysqlTable('verifycodes', {
.notNull()
})
export const resetCodes = mysqlTable('resetcodes', {
id: bigint('id', { mode: 'number' }).primaryKey().autoincrement().notNull(),
code: varchar('code', { length: 64 }).notNull(),
ip: varchar('ip', { length: 255 }),
timestamp: bigint('timestamp', { mode: 'number' }).notNull(),
usedTimestamp: bigint('usedTimestamp', { mode: 'number' })
.default(0)
.notNull()
})
// berrydashdatabase
export const berryDashUserData = mysqlTable('userdata', {