I have a WebService where I have to modify DATEFIN
by today's date and DATEDEBUT
by a date 1 year before.
Currently, I have this below
Here my dates are entered "manually", how I could create this correctly, please?
getNews(SVM, last) {
var payload = {
"HEADER": this.sh.getHeaderForRequest(),
"SVM": SVM,
"PERIODE": {
"DATEDEBUT": "2018-01-01",
"DATEFIN": "2021-01-01"
},
"LASTX": 0
}
return this.http.post < any[] > (this.getBaseUrl() + `/WLOLARTL`, payload);
}
Here is my method getNews()
getNews() {
return this.api.getNews(this.svm, 20)
.pipe(
map((response: {}) => {
// this.getDetails();
this.prepareData(response);
})
);
}
Thank you so much.