X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/c4489d532c800a91ea66f3aaec98fc4a299e3e1e..75ba9a3ad91766f21d7edf9f7bfc05226b2c0144:/src/services/user-service/user-service.ts diff --git a/src/services/user-service/user-service.ts b/src/services/user-service/user-service.ts index 3c09a87d78..d8c7fe3d94 100644 --- a/src/services/user-service/user-service.ts +++ b/src/services/user-service/user-service.ts @@ -3,11 +3,28 @@ // SPDX-License-Identifier: AGPL-3.0 import { AxiosInstance } from "axios"; -import { CommonResourceService } from "~/common/api/common-resource-service"; +import { CommonResourceService } from "~/services/common-service/common-resource-service"; import { UserResource } from "~/models/user"; +import { ApiActions } from "~/services/api/api-actions"; export class UserService extends CommonResourceService { - constructor(serverApi: AxiosInstance) { - super(serverApi, "users"); + constructor(serverApi: AxiosInstance, actions: ApiActions) { + super(serverApi, "users", actions); } -} \ No newline at end of file + + activate(uuid: string) { + return CommonResourceService.defaultResponse( + this.serverApi + .post(this.resourceType + `/${uuid}/activate`), + this.actions + ); + } + + unsetup(uuid: string) { + return CommonResourceService.defaultResponse( + this.serverApi + .post(this.resourceType + `/${uuid}/unsetup`), + this.actions + ); + } +}