Skip to content

Commit

Permalink
fix(session: mysql): session data incorrectly saved as string instead…
Browse files Browse the repository at this point in the history
… of json
  • Loading branch information
ephrimlawrence committed Mar 1, 2024
1 parent 3004200 commit 12ee9aa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/sessions/mysql.session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ export class MySQLSession extends BaseSession {
async set(sessionId: string, key: string, value: any): Promise<void> {
await this.db.query(
`UPDATE ${this.tableName} SET data = JSON_SET(data, '$.${key}', ?) WHERE session_id = ? ${this.softDeleteQuery}`,
[JSON.stringify(value), sessionId],
[value, sessionId],
);
return await this.get(sessionId, key, value);
}
Expand Down

0 comments on commit 12ee9aa

Please sign in to comment.