Add integration of publication

This commit is contained in:
Tiago Kayaya
2020-12-10 11:22:06 +01:00
parent 21cb7d5e96
commit 8597d0a0b0
17 changed files with 274 additions and 19 deletions
+25
View File
@@ -104,6 +104,31 @@ export class PublicationsService {
};
return this.http.get<any>(`${geturl}`, options);
}
CreatePublication(folderId:any,body:any){
const geturl = environment.apiURL + 'presidentialActions/'+folderId+'/posts';
let params = new HttpParams();
params = params.set("folderId", folderId);
let options = {
headers: this.headers,
params: params
};
return this.http.post<any>(`${geturl}`, body, options).toPromise().then(res =>{
console.log(res);
});
}
UpdatePublication(folderId:any,body:any){
const geturl = environment.apiURL + 'presidentialActions/'+folderId+'/posts';
let params = new HttpParams();
params = params.set("folderId", folderId);
let options = {
headers: this.headers,
params: params
};
return this.http.put<any>(`${geturl}`, body, options).toPromise().then(res =>{
console.log(res);
});
}
}