const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
userId: '8126cc3e-ca66-4c02-83f5-06273452120d',
workHourSettings: {
expectedWorkMinutesPerDay: 430,
expectedProductiveWorkMinutesPerDay: 360,
expectedInTime: '08:00 am'
}
})
};
fetch('https://api.trackpilots.com/v1/settings/expected-work-hours', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));