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 7d067eb commit b8251a0
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 @@ -152,7 +152,7 @@ export class MySQLSession extends BaseSession {
return defaultValue;
}

return (val[key] || defaultValue) as T;
return (JSON.parse(val.data)[key] || defaultValue) as T;
}

async getAll<T>(sessionId: string): Promise<T | undefined> {
Expand All @@ -165,6 +165,6 @@ export class MySQLSession extends BaseSession {
return undefined;
}

return val as T;
return JSON.parse(val.data) as T;
}
}

0 comments on commit b8251a0

Please sign in to comment.