File tree Expand file tree Collapse file tree 5 files changed +10
-3
lines changed Expand file tree Collapse file tree 5 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -53,6 +53,7 @@ function generateSchema(dialect: 'sqlite' | 'postgres'): AnySchema {
5353 const generatedSchema : AnySchema = { } ;
5454
5555 // Create enum for PostgreSQL auth_type
56+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
5657 let authTypeEnum : any = null ;
5758 if ( dialect === 'postgres' ) {
5859 authTypeEnum = pgEnum ( 'auth_type' , authTypeEnumValues ) ;
@@ -331,6 +332,7 @@ export function getSchema(): AnySchema {
331332
332333// Helper function to safely execute database operations with proper typing
333334export function executeDbOperation < T > (
335+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
334336 operation : ( db : any , schema : any ) => Promise < T > | T
335337) : Promise < T > | T {
336338 const db = getDb ( ) ;
Original file line number Diff line number Diff line change @@ -9,7 +9,9 @@ import type { BetterSQLite3Database } from 'drizzle-orm/better-sqlite3';
99// These types would ideally be more specific, generated by Drizzle or manually defined
1010// to match your authUserTable, authSessionTable structures.
1111// For now, using 'any' as a placeholder based on db/index.ts AnySchema.
12+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
1213type AuthUserTable = any ;
14+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
1315type AuthSessionTable = any ;
1416
1517// Cached instances for lazy initialization
Original file line number Diff line number Diff line change 1+ /* eslint-disable @typescript-eslint/no-explicit-any */
12import type { FastifyInstance , FastifyReply } from 'fastify' ;
23import { getLucia , getGithubAuth } from '../../lib/lucia' ;
3- import { GithubCallbackSchema , type GithubCallbackInput } from './schemas' ;
4+ import { type GithubCallbackInput } from './schemas' ;
45import { getDb , getSchema } from '../../db' ;
56import { eq } from 'drizzle-orm' ;
67import { generateId } from 'lucia' ;
Original file line number Diff line number Diff line change 11import type { FastifyInstance , FastifyReply } from 'fastify' ;
22import { getLucia } from '../../lib/lucia' ; // Corrected import
3- import { LoginEmailSchema , type LoginEmailInput } from './schemas' ;
3+ import { type LoginEmailInput } from './schemas' ;
44// argon2 is not directly used here as lucia.useKey handles password verification
55import { verify } from '@node-rs/argon2' ;
66import { getDb , getSchema } from '../../db' ;
@@ -23,6 +23,7 @@ export default async function loginEmailRoute(fastify: FastifyInstance) {
2323 }
2424
2525 // Find user by email or username
26+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
2627 const users = await ( db as any )
2728 . select ( )
2829 . from ( authUserTable )
Original file line number Diff line number Diff line change 1+ /* eslint-disable @typescript-eslint/no-explicit-any */
12import type { FastifyInstance , FastifyReply } from 'fastify' ;
23import { getLucia } from '../../lib/lucia' ;
3- import { RegisterEmailSchema , type RegisterEmailInput } from './schemas' ;
4+ import { type RegisterEmailInput } from './schemas' ;
45import { getDb , getSchema } from '../../db' ;
56import { eq , or } from 'drizzle-orm' ;
67import { generateId } from 'lucia' ; // Lucia's utility for generating IDs
You can’t perform that action at this time.
0 commit comments