mirror of
https://github.com/Mail-0/Zero.git
synced 2026-07-01 08:16:28 +00:00
12 lines
333 B
TypeScript
12 lines
333 B
TypeScript
import { authClient } from './auth-client';
|
|
|
|
export const authProxy = {
|
|
api: {
|
|
getSession: async ({ headers }: { headers: Headers }) => {
|
|
const session = await authClient.getSession({ fetchOptions: { headers } });
|
|
if (session.error) throw new Error(session.error.message);
|
|
return session.data;
|
|
},
|
|
},
|
|
};
|