Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
1.1 kB
2
Indexable
Never
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}`);
  }