mirror of
https://github.com/better-auth/better-auth.git
synced 2026-06-04 13:26:23 -05:00
chore: set listSessions token to "" instead of undefined (#6745)
This commit is contained in:
committed by
github-actions[bot]
parent
7a26d7e414
commit
cecaadddf9
@@ -607,16 +607,11 @@ export const listSessions = <Option extends BetterAuthOptions>() =>
|
||||
.map((session) => {
|
||||
return {
|
||||
...session,
|
||||
token: undefined, // we don't need to return the token to the client
|
||||
expiresAt: session.expiresAt.toISOString(),
|
||||
createdAt: session.createdAt.toISOString(),
|
||||
updatedAt: session.updatedAt.toISOString(),
|
||||
token: "", // we don't need to return the token to the client
|
||||
};
|
||||
});
|
||||
return ctx.json(
|
||||
activeSessions as unknown as Prettify<
|
||||
InferSession<Option> & { token: undefined }
|
||||
>[],
|
||||
activeSessions as unknown as Prettify<InferSession<Option>>[],
|
||||
);
|
||||
} catch (e: any) {
|
||||
ctx.context.logger.error(e);
|
||||
|
||||
Reference in New Issue
Block a user