diff --git a/src/server/api/cnf/[clientOneTimeLink].ts b/src/server/api/cnf/[clientOneTimeLink].ts index e8d4a1ea..5e2a058b 100644 --- a/src/server/api/cnf/[clientOneTimeLink].ts +++ b/src/server/api/cnf/[clientOneTimeLink].ts @@ -11,6 +11,7 @@ export default defineEventHandler(async (event) => { message: 'Invalid state', }); } + // TODO: validate with zod const clientOneTimeLink = getRouterParam(event, 'clientOneTimeLink'); const clients = await WireGuard.getClients(); const client = clients.find( diff --git a/src/server/utils/Database.ts b/src/server/utils/Database.ts index be96c2d2..cb2bcc0a 100644 --- a/src/server/utils/Database.ts +++ b/src/server/utils/Database.ts @@ -13,4 +13,6 @@ provider.connect().catch((err) => { process.exit(1); }); +// TODO: check if old config exists and tell user about migration path + export default provider; diff --git a/src/services/database/lowdb.ts b/src/services/database/lowdb.ts index 48387138..5c2fa98b 100644 --- a/src/services/database/lowdb.ts +++ b/src/services/database/lowdb.ts @@ -75,6 +75,7 @@ export default class LowDB extends DatabaseProvider { async newUserWithPassword(username: string, password: string) { DEBUG('New User'); + // TODO: should be handled by zod. completely remove database error if (username.length < 8) { throw new DatabaseError(DatabaseError.ERROR_USERNAME_REQ); }