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