Currently deepening my knowledge in Angular and I encountered a situation within one of my services
agree(id: string) {
const headers = new HttpHeaders('Content-Type: application/json');
return this.HttpClient.put(`${this.apiUrl}/agree/`, JSON.stringify(id), {headers});
}
Initially, this approach functioned seamlessly as anticipated...however, I came to the realization that passing the userId may not be considered a Best Practice. Instead, I opted to utilize the HttpContext.User to retrieve the user Id property within my ASP.Net Core Web API, prompting me to modify my method.
agree() {
return this.HttpClient.put(`${this.apiUrl}/agreeEula/`);
}
Now encountering the following issue
“Expected 2-3 arguments, but received only 1”
Open to any suggestions or insights on this matter. Thank you in advance.