27 lines
970 B
TypeScript
27 lines
970 B
TypeScript
import { RegisterModel } from "../../models/registers/RegisterModel";
|
|
import { Observable } from "rxjs";
|
|
import { HttpHeaders } from "@angular/common/http";
|
|
import { HostConfiguration } from "../../app.constants";
|
|
import { BaseHttpService } from "../../utilities/cite-http-service-module/base-http.service";
|
|
import { Injectable } from "@angular/core";
|
|
|
|
@Injectable()
|
|
export class RegistryService {
|
|
|
|
private actionUrl: string;
|
|
private headers: HttpHeaders;
|
|
|
|
constructor(private http: BaseHttpService) {
|
|
|
|
this.actionUrl = HostConfiguration.Server + 'registries/';
|
|
|
|
this.headers = new HttpHeaders();
|
|
this.headers = this.headers.set('Content-Type', 'application/json');
|
|
this.headers = this.headers.set('Accept', 'application/json');
|
|
}
|
|
|
|
create(registerModel: RegisterModel): Observable<RegisterModel> {
|
|
return this.http.post<RegisterModel>(this.actionUrl + 'create', registerModel, { headers: this.headers })
|
|
}
|
|
}
|