1
0
Fork 0
mirror of synced 2024-06-20 19:30:28 +12:00
budibase/packages/worker/src/tests/api/self.ts
2022-08-25 19:41:47 +01:00

22 lines
479 B
TypeScript

import TestConfiguration from "../TestConfiguration"
import { User } from "@budibase/types"
export class SelfAPI {
config: TestConfiguration
request: any
constructor(config: TestConfiguration) {
this.config = config
this.request = config.request
}
updateSelf = (user: User) => {
return this.request
.post(`/api/global/self`)
.send(user)
.set(this.config.authHeaders(user))
.expect("Content-Type", /json/)
.expect(200)
}
}