Untitled

 avatar
unknown
plain_text
3 years ago
1.1 kB
5
Indexable
query(req: any): Observable<ConfigurationResponse>{
    return this.http.get<ConfigurationResponse>(this.apiUrl, {params: Params.getParams(req)});
  }

  findById(id: string): Observable<ConfigurationByID>{
    return this.http.get<ConfigurationByID>(`${this.apiUrl}/${id}`);
  }

  save(body: ConfigurationContent): Observable<ConfigurationContent>{
    return this.http.post<ConfigurationContent>(this.apiUrl, body);
  }

  update(id: string, body: ConfigurationContent): Observable<ConfigurationContent>{
    return this.http.put<ConfigurationContent>(`${this.apiUrl}/${id}`, body);
  }

  delete(item: ConfigurationContent){
    return this.http.delete(`${this.apiUrl}/${item.taxId}`);
  }

  saveDoc(body: DocContent): Observable<DocContent>{
    return this.http.post<DocContent>(`${this.apiUrlConfigurations}`, body);
  }

  updateDoc(id: number, body: DocContent): Observable<DocContent>{
    return this.http.put<DocContent>(`${this.apiUrlConfigurations}/${id}`, body);
  }

  deleteDoc(id: number){
    return this.http.delete(`${this.apiUrlConfigurations}/${id}`);
  }
Editor is loading...