Skip to content

Commit

Permalink
fix(session: mysql): query bug when querying session data
Browse files Browse the repository at this point in the history
  • Loading branch information
ephrimlawrence committed Feb 29, 2024
1 parent a81fd3f commit 156c10e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/sessions/mysql.session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ export class MySQLSession extends BaseSession {
key: string,
defaultValue?: T,
): Promise<T | undefined> {
const [val] = await this.db.one(
const [val] = await this.db.query(
`SELECT data FROM ${this.tableName} WHERE session_id = ? ${this.softDeleteQuery} LIMIT 1`,
[sessionId],
);
Expand All @@ -157,7 +157,7 @@ export class MySQLSession extends BaseSession {
}

async getAll<T>(sessionId: string): Promise<T | undefined> {
const [val] = await this.db.one(
const [val] = await this.db.query(
`SELECT data FROM ${this.tableName} WHERE session_id = ? ${this.softDeleteQuery}`,
[sessionId],
);
Expand Down

0 comments on commit 156c10e

Please sign in to comment.