mirror of
https://github.com/roleypoly/roleypoly.git
synced 2025-06-18 02:19:09 +00:00
feat: start basis of new web ui system on CRA
This commit is contained in:
parent
40f577d01d
commit
38ee680a33
43 changed files with 465 additions and 174 deletions
12
packages/api/handlers/get-session.ts
Normal file
12
packages/api/handlers/get-session.ts
Normal file
|
@ -0,0 +1,12 @@
|
|||
import { SessionData } from '../../../src/common/types';
|
||||
import { respond, withSession } from '../utils/api-tools';
|
||||
|
||||
export const GetSession = withSession((session?: SessionData) => (): Response => {
|
||||
const { user, guilds, sessionID } = session || {};
|
||||
|
||||
return respond({
|
||||
user,
|
||||
guilds,
|
||||
sessionID,
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue