I have a function to call API like this
async addOffDayReplacement(employeeId: string, days: number) {
console.log(days);
await Axios.post('/api/v1/leaveQuota/' + employeeId, {
params: {
additionalDays: days
}
});
}
And have API
[HttpPost("{id}")]
public async Task<ActionResult<bool>> Update(string id, int additionalDays)
{
await leaveService.AddReplacement(id, additionalDays);
return true;
}
But the additionalDays
in my API always 0 even when value that I sent from my service is not 0
Anybody know why? And how to solve this?