import { Injectable } from '@angular/core'; import { _lookup } from 'tournee.businesslogic'; import { HttpWrapperService } from './http-wrapper.service'; import { ApiResult } from '../resources/utility_models/api_result'; @Injectable() export class LookupsService { constructor(private http: HttpWrapperService) {} update(data : T) { return this.http.securePut>>('/systemadmin/lookups/' + data.getType(), data); } add(data : T) { return this.http.securePost>>('/systemadmin/lookups/' + data.getType(), data); } delete(data : T) { return this.http.secureDelete>>('/systemadmin/lookups/' + data.getType() + '/' + data.id); } get(lookup_type) { return this.http.insecureGet>>('/system/lookups/' + lookup_type); } }