TU-Wien-dataLAB / Grader-Labextension

BSD 3-Clause "New" or "Revised" License
3 stars 1 forks source link

Fix `request` calls in frontend services #12

Closed meffmadd closed 8 months ago

meffmadd commented 9 months ago

Describe the bug Some calls to the request function are called with incorrect parameters where the reload parameter of the service function is actually the body parameter or the request function. For example, in the getAllAssignments the call looks as follows: request<AssignmentDetail[]>(HTTPMethod.GET, url, reload);. If the reload parameter is set to true, the call fails because the "truthy" value of reload is interpreted as the request body, which a GET request cannot have. This results in an error. A correct call would look like this: request<AssignmentDetail[]>(HTTPMethod.GET, url, null, reload);, where the body parameter is set to null and the reload parameter works as intended.