Chirag4904 / timetable

0 stars 2 forks source link

`remainingHours` are returned alongwith `allotedHours` when calling the subjects api #101

Closed RoguedBear closed 1 year ago

RoguedBear commented 1 year ago

Description

whenever you hit the /subject api, first a function is called which computes the allocated hours for all the subjects (that have been alloted), after that the normal aggregate function is called, which also calculated remainingHours and sends the response back

i have left notes and some article links in case you're interested in what im doing

PS: this pr also includes commits from #100

let me know if there are any errors you find in the api call

Checklist:

closes #98

RoguedBear commented 1 year ago

also, good morning. i gotta go sleep now hope i havent messed something up while being half awake :sleepy:

RoguedBear commented 1 year ago

converting to draft, cuz i forgot to implement one thing: don calculate remaining hours if the last updated timestamp is less than the last time it was calculated