teableio/teable

View on GitHub
apps/nextjs-app/src/backend/api/rest/get-user.ts

Summary

Maintainability
A
0 mins
Test Coverage
import type { IUser } from '@teable/sdk';
import { axios } from './axios';

export async function getUserMe(cookie?: string) {
  return await axios
    .get<IUser>(`/auth/user/me`, {
      headers: { cookie },
    })
    .then(({ data }) => data);
}