Migrate Playwright privateApi helper to new client API

This commit is contained in:
Yurii Motov
2026-07-23 22:07:51 +02:00
parent 2565fef91e
commit 3107696ad9
+8 -4
View File
@@ -1,8 +1,11 @@
// Note: the `PrivateService` is only available when generating the client
// for local environments
import { OpenAPI, PrivateService } from "../../src/client"
import { PrivateService } from "../../src/client"
import { client } from "../../src/client/client.gen"
OpenAPI.BASE = `${process.env.VITE_API_URL}`
client.setConfig({
baseURL: `${process.env.VITE_API_URL}`,
})
export const createUser = async ({
email,
@@ -11,12 +14,13 @@ export const createUser = async ({
email: string
password: string
}) => {
return await PrivateService.createUser({
requestBody: {
const response = await PrivateService.createUser({
body: {
email,
password,
is_verified: true,
full_name: "Test User",
},
})
return response.data
}