From ca03800b9a42948351701698ffa5156a4864f9b0 Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Thu, 29 Sep 2022 09:56:09 +0100 Subject: [PATCH] removing users api file as no longer required --- .../internal-api/TestConfiguration/users.ts | 44 ------------------- 1 file changed, 44 deletions(-) delete mode 100644 qa-core/src/config/internal-api/TestConfiguration/users.ts diff --git a/qa-core/src/config/internal-api/TestConfiguration/users.ts b/qa-core/src/config/internal-api/TestConfiguration/users.ts deleted file mode 100644 index 8e53e4ee7f..0000000000 --- a/qa-core/src/config/internal-api/TestConfiguration/users.ts +++ /dev/null @@ -1,44 +0,0 @@ -import PublicAPIClient from "./InternalAPIClient" -import { - CreateUserParams, - SearchInputParams, - User, -} from "@budibase/server/api/controllers/public/mapping/types" -import { Response } from "node-fetch" -import generateUser from "../fixtures/users" - -export default class UserApi { - api: PublicAPIClient - - constructor(apiClient: PublicAPIClient) { - this.api = apiClient - } - - async seed() { - return this.create(generateUser()) - } - - async create(body: CreateUserParams): Promise<[Response, User]> { - const response = await this.api.post(`/users`, { body }) - const json = await response.json() - return [response, json.data] - } - - async read(id: string): Promise<[Response, User]> { - const response = await this.api.get(`/users/${id}`) - const json = await response.json() - return [response, json.data] - } - - async search(body: SearchInputParams): Promise<[Response, [User]]> { - const response = await this.api.post(`/users/search`, { body }) - const json = await response.json() - return [response, json.data] - } - - async update(id: string, body: User): Promise<[Response, User]> { - const response = await this.api.put(`/users/${id}`, { body }) - const json = await response.json() - return [response, json.data] - } -}