diff --git a/src/core/token_providers/database.ts b/src/core/token_providers/database.ts index 1255da5..1311457 100644 --- a/src/core/token_providers/database.ts +++ b/src/core/token_providers/database.ts @@ -59,9 +59,7 @@ export abstract class DatabaseTokenProvider implements TokenProviderContr * Returns an instance of the query builder */ protected getQueryBuilder() { - return this.options.client - ? this.options.client.query() - : this.db.connection(this.options.connection).query() + return this.db.connection(this.options.connection).query() } /** @@ -69,9 +67,7 @@ export abstract class DatabaseTokenProvider implements TokenProviderContr * queries */ protected getInsertQueryBuilder() { - return this.options.client - ? this.options.client.insertQuery() - : this.db.connection(this.options.connection).insertQuery() + return this.db.connection(this.options.connection).insertQuery() } /** diff --git a/src/core/types.ts b/src/core/types.ts index f467025..8bce70d 100644 --- a/src/core/types.ts +++ b/src/core/types.ts @@ -11,7 +11,7 @@ import type { QueryClientContract } from '@adonisjs/lucid/types/database' import type { GuardUser } from './guard_user.js' import type { PROVIDER_REAL_USER } from '../symbols.js' -import { LucidModel, LucidRow } from '@adonisjs/lucid/types/model' +import type { LucidModel, LucidRow } from '@adonisjs/lucid/types/model' /** * A token represents an opaque token issued to a client @@ -171,15 +171,6 @@ export type DatabaseUserProviderOptions> = */ connection?: string - /** - * Optionally define the query client instance to use for making - * database queries. - * - * When both "connection" and "client" are defined, the client will - * be given the preference. - */ - client?: QueryClientContract - /** * Database table to query to find the user */ @@ -212,15 +203,6 @@ export type DatabaseTokenProviderOptions = { */ connection?: string - /** - * Optionally define the query client instance to use for making - * database queries. - * - * When both "connection" and "client" are defined, the client will - * be given the preference. - */ - client?: QueryClientContract - /** * Database table to query to find the user */ diff --git a/src/core/user_providers/database.ts b/src/core/user_providers/database.ts index 984d044..02013ff 100644 --- a/src/core/user_providers/database.ts +++ b/src/core/user_providers/database.ts @@ -100,9 +100,7 @@ export abstract class DatabaseUserProvider> * Returns an instance of the query builder */ protected getQueryBuilder() { - return this.options.client - ? this.options.client.query() - : this.db.connection(this.options.connection).query() + return this.db.connection(this.options.connection).query() } /**