mirror of
https://github.com/roleypoly/roleypoly.git
synced 2025-04-25 11:59:11 +00:00
chore: remove mustAuthenticate from get-session
This commit is contained in:
parent
bb0987cab9
commit
447876be32
1 changed files with 8 additions and 13 deletions
|
@ -1,17 +1,12 @@
|
||||||
import { SessionData } from 'roleypoly/common/types';
|
import { SessionData } from 'roleypoly/common/types';
|
||||||
import { respond, withSession } from '../utils/api-tools';
|
import { respond, withSession } from '../utils/api-tools';
|
||||||
|
|
||||||
export const GetSession = withSession(
|
export const GetSession = withSession((session?: SessionData) => (): Response => {
|
||||||
(session?: SessionData) => (): Response => {
|
const { user, guilds, sessionID } = session || {};
|
||||||
const { user, guilds, sessionID } = session || {};
|
|
||||||
|
|
||||||
return respond({
|
return respond({
|
||||||
user,
|
user,
|
||||||
guilds,
|
guilds,
|
||||||
sessionID,
|
sessionID,
|
||||||
});
|
});
|
||||||
},
|
});
|
||||||
{
|
|
||||||
mustAuthenticate: true,
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue