mirror of
https://github.com/roleypoly/roleypoly.git
synced 2025-06-17 18:09:09 +00:00
miniflare init
This commit is contained in:
parent
8c07ed3123
commit
688954a2e0
52 changed files with 898 additions and 25 deletions
13
packages/api/old-src/handlers/get-session.ts
Normal file
13
packages/api/old-src/handlers/get-session.ts
Normal file
|
@ -0,0 +1,13 @@
|
|||
import { SessionData } from '@roleypoly/types';
|
||||
import { respond } from '@roleypoly/worker-utils';
|
||||
import { 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