]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/pybind/mgr/dashboard/frontend/src/app/shared/api/role.service.ts
update source to Ceph Pacific 16.2.2
[ceph.git] / ceph / src / pybind / mgr / dashboard / frontend / src / app / shared / api / role.service.ts
index 08c1097115d4690842c28155f125181dafcec5c3..e76846b418f06df24e8d42c2e63a483de9d2cea9 100644 (file)
@@ -1,14 +1,13 @@
-import { HttpClient, HttpParams } from '@angular/common/http';
+import { HttpClient } from '@angular/common/http';
 import { Injectable } from '@angular/core';
 
 import { Observable, of as observableOf } from 'rxjs';
 import { mergeMap } from 'rxjs/operators';
 
-import { RoleFormModel } from '../../core/auth/role-form/role-form.model';
-import { ApiModule } from './api.module';
+import { RoleFormModel } from '~/app/core/auth/role-form/role-form.model';
 
 @Injectable({
-  providedIn: ApiModule
+  providedIn: 'root'
 })
 export class RoleService {
   constructor(private http: HttpClient) {}
@@ -30,9 +29,7 @@ export class RoleService {
   }
 
   clone(name: string, newName: string) {
-    let params = new HttpParams();
-    params = params.append('new_name', newName);
-    return this.http.post(`api/role/${name}/clone`, null, { params });
+    return this.http.post(`api/role/${name}/clone`, { new_name: newName });
   }
 
   update(role: RoleFormModel) {