api client refactor
This commit is contained in:
9
apps/website/lib/services/auth/SessionService.ts
Normal file
9
apps/website/lib/services/auth/SessionService.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import { api as api } from '../../api';
|
||||
import { SessionViewModel } from '../../view-models';
|
||||
|
||||
export async function getSession(): Promise<SessionViewModel | null> {
|
||||
const dto = await api.auth.getSession();
|
||||
if (!dto) return null;
|
||||
// TODO: presenter
|
||||
return dto as any;
|
||||
}
|
||||
Reference in New Issue
Block a user