From: Stephen Smith Date: Wed, 2 Mar 2022 14:28:36 +0000 (-0500) Subject: 18559: Add user service setup and add return type for unsetup. X-Git-Tag: 2.4.0~1^2~38 X-Git-Url: https://git.arvados.org/arvados-workbench2.git/commitdiff_plain/4e862392eae3d1a1846b3f33c6e29f4e68c31aca 18559: Add user service setup and add return type for unsetup. Arvados-DCO-1.1-Signed-off-by: Stephen Smith --- diff --git a/src/services/user-service/user-service.ts b/src/services/user-service/user-service.ts index e6560c84..97cb3c71 100644 --- a/src/services/user-service/user-service.ts +++ b/src/services/user-service/user-service.ts @@ -6,6 +6,7 @@ import { AxiosInstance } from "axios"; import { CommonResourceService } from "services/common-service/common-resource-service"; import { UserResource } from "models/user"; import { ApiActions } from "services/api/api-actions"; +import { ListResults } from "services/common-service/common-service"; export class UserService extends CommonResourceService { constructor(serverApi: AxiosInstance, actions: ApiActions, readOnlyFields: string[] = []) { @@ -24,8 +25,16 @@ export class UserService extends CommonResourceService { ); } + setup(uuid: string) { + return CommonResourceService.defaultResponse>( + this.serverApi + .post(this.resourceType + `/setup`, {}, { params: { uuid } }), + this.actions + ); + } + unsetup(uuid: string) { - return CommonResourceService.defaultResponse( + return CommonResourceService.defaultResponse( this.serverApi .post(this.resourceType + `/${uuid}/unsetup`), this.actions