From 156c10e14a5a90d4e7996f4142eed44af1d8fe26 Mon Sep 17 00:00:00 2001 From: Lawrence Ephrim Date: Thu, 29 Feb 2024 22:42:47 +0000 Subject: [PATCH] fix(session: mysql): query bug when querying session data --- src/sessions/mysql.session.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sessions/mysql.session.ts b/src/sessions/mysql.session.ts index 5d8b836..74fee4c 100644 --- a/src/sessions/mysql.session.ts +++ b/src/sessions/mysql.session.ts @@ -144,7 +144,7 @@ export class MySQLSession extends BaseSession { key: string, defaultValue?: T, ): Promise { - 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], ); @@ -157,7 +157,7 @@ export class MySQLSession extends BaseSession { } async getAll(sessionId: string): Promise { - const [val] = await this.db.one( + const [val] = await this.db.query( `SELECT data FROM ${this.tableName} WHERE session_id = ? ${this.softDeleteQuery}`, [sessionId], );