import { RiskSource } from "../model/risk-source.model"; import { HostConfig } from '../config/host.config'; import { Injectable } from '@angular/core'; import { HttpHandler } from './http-handler.service'; import { Page } from '../response/page.type'; @Injectable({ providedIn: 'root', }) export class RiskSourceService { static PATH = '/riskSource'; constructor(private httpHandler: HttpHandler) {} createRiskSource(riskSource: RiskSource, header?: any): Promise { return this.httpHandler.post(`${HostConfig.DEV_HOST}${RiskSourceService.PATH}/create` ,riskSource, header); } updateRiskSource(riskSource: RiskSource, header?: any): Promise { return this.httpHandler.post(`${HostConfig.DEV_HOST}${RiskSourceService.PATH}/update` ,riskSource, header); } findAllRiskSource(header?: any): Promise> { return this.httpHandler.get>(`${HostConfig.DEV_HOST}${RiskSourceService.PATH}/findAll`, header); } }