mirror of
https://github.com/HeyPuter/puter.git
synced 2025-01-23 14:20:22 +08:00
Fix mysql incompatibility
This commit is contained in:
parent
0eedcf567e
commit
356a3284fa
@ -240,7 +240,10 @@ class AuthService extends BaseService {
|
||||
[uuid],
|
||||
);
|
||||
|
||||
session.meta = JSON.parse(session.meta ?? {});
|
||||
session.meta = this.db.case({
|
||||
mysql: () => session.meta,
|
||||
otherwise: () => JSON.parse(session.meta ?? "{}")
|
||||
})();
|
||||
|
||||
return session;
|
||||
}
|
||||
@ -375,10 +378,13 @@ class AuthService extends BaseService {
|
||||
);
|
||||
|
||||
sessions.forEach(session => {
|
||||
session.meta = this.db.case({
|
||||
mysql: () => session.meta,
|
||||
otherwise: () => JSON.parse(session.meta ?? "{}")
|
||||
})();
|
||||
if ( session.uuid === actor.type.session ) {
|
||||
session.current = true;
|
||||
}
|
||||
session.meta = JSON.parse(session.meta ?? "{}");
|
||||
});
|
||||
|
||||
return sessions;
|
||||
|
Loading…
Reference in New Issue
Block a user