mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
Improve search page
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { EventPerson } from '../models/eventperson.model';
|
||||
import { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http';
|
||||
import { Observable } from 'rxjs';
|
||||
import { environment } from 'src/environments/environment';
|
||||
import { AuthService } from '../services/auth.service';
|
||||
import { User } from '../models/user.model';
|
||||
import { OrganicEntity } from 'src/app/models/organic-entity.model';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class OrganicEntityService {
|
||||
|
||||
authheader = {};
|
||||
loggeduser: User;
|
||||
headers: HttpHeaders;
|
||||
|
||||
constructor(private http: HttpClient, user: AuthService) {
|
||||
this.loggeduser = user.ValidatedUser;
|
||||
this.headers = new HttpHeaders();
|
||||
this.headers = this.headers.set('Authorization', this.loggeduser.BasicAuthKey);
|
||||
}
|
||||
|
||||
getOrganicEntity(): Observable<OrganicEntity[]>{
|
||||
|
||||
const geturl = environment.apiURL + 'ecm/organic';
|
||||
|
||||
let options = {
|
||||
headers: this.headers,
|
||||
};
|
||||
|
||||
return this.http.get<OrganicEntity[]>(`${geturl}`, options);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user