X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/c324b64f3b26e79b4640b6f0cf55671f1a261bca..342f4ed11da7860e834928aa79974f096a8f6291:/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 a69203dc5b..dbbd5be8c2 100644 --- a/src/services/user-service/user-service.ts +++ b/src/services/user-service/user-service.ts @@ -3,12 +3,28 @@ // SPDX-License-Identifier: AGPL-3.0 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 { 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, actions: ApiActions) { super(serverApi, "users", actions); } + + 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 + ); + } }