← full-stack-fastapi-template  /  frontend/tests/utils/privateApi.ts

1
// Note: the `PrivateService` is only available when generating the client
2
// for local environments
3
import { OpenAPI, PrivateService } from "../../src/client"
4
5
OpenAPI.BASE = `${process.env.VITE_API_URL}`
6
7
export const createUser = async ({
8
  email,
9
  password,
10
}: {
11
  email: string
12
  password: string
13
}) => {
14
  return await PrivateService.createUser({
15
    requestBody: {
16
      email,
17
      password,
18
      is_verified: true,
19
      full_name: "Test User",
20
    },
21
  })
22
}
23