Merge branch '16672-live-container-logs'. Closes #16672
[arvados-workbench2.git] / src / services / user-service / user-service.ts
1 // Copyright (C) The Arvados Authors. All rights reserved.
2 //
3 // SPDX-License-Identifier: AGPL-3.0
4
5 import { AxiosInstance } from "axios";
6 import { CommonResourceService } from "services/common-service/common-resource-service";
7 import { UserResource } from "models/user";
8 import { ApiActions } from "services/api/api-actions";
9
10 export class UserService extends CommonResourceService<UserResource> {
11     constructor(serverApi: AxiosInstance, actions: ApiActions) {
12         super(serverApi, "users", actions);
13     }
14
15     activate(uuid: string) {
16         return CommonResourceService.defaultResponse(
17             this.serverApi
18                 .post(this.resourceType + `/${uuid}/activate`),
19             this.actions
20         );
21     }
22
23     unsetup(uuid: string) {
24         return CommonResourceService.defaultResponse(
25             this.serverApi
26                 .post(this.resourceType + `/${uuid}/unsetup`),
27             this.actions
28         );
29     }
30 }