mirror of
https://github.com/fastapi/full-stack-fastapi-template.git
synced 2026-09-21 13:28:57 +00:00
Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
27 lines
560 B
TypeScript
27 lines
560 B
TypeScript
// Note: the `PrivateService` is only available when generating the client
|
|
// for local environments
|
|
import { PrivateService } from "../../src/client"
|
|
import { client } from "../../src/client/client.gen"
|
|
|
|
client.setConfig({
|
|
baseURL: `${process.env.VITE_API_URL}`,
|
|
})
|
|
|
|
export const createUser = async ({
|
|
email,
|
|
password,
|
|
}: {
|
|
email: string
|
|
password: string
|
|
}) => {
|
|
const response = await PrivateService.createUser({
|
|
body: {
|
|
email,
|
|
password,
|
|
is_verified: true,
|
|
full_name: "Test User",
|
|
},
|
|
})
|
|
return response.data
|
|
}
|