]> git.proxmox.com Git - ceph.git/blame - ceph/src/pybind/mgr/dashboard/frontend/src/app/shared/api/rgw-site.service.ts
import 15.2.4
[ceph.git] / ceph / src / pybind / mgr / dashboard / frontend / src / app / shared / api / rgw-site.service.ts
CommitLineData
9f95a23c
TL
1import { HttpClient, HttpParams } from '@angular/common/http';
2import { Injectable } from '@angular/core';
3
4import { cdEncode } from '../decorators/cd-encode';
5import { ApiModule } from './api.module';
6
7@cdEncode
8@Injectable({
9 providedIn: ApiModule
10})
11export class RgwSiteService {
12 private url = 'api/rgw/site';
13
14 constructor(private http: HttpClient) {}
15
e306af50 16 get(query?: string) {
9f95a23c 17 let params = new HttpParams();
e306af50
TL
18 if (query) {
19 params = params.append('query', query);
20 }
9f95a23c
TL
21
22 return this.http.get(this.url, { params: params });
23 }
24}