Skip to content

Conversation

sunnyyuqingchen
Copy link
Contributor

added routes for:
GET /user/timetables
GET /user/timetables/:id/view
POST /user/timetables
PATCH /user/timetables/:id/change-primary
DELETE /user/timetables/:id

@sunnyyuqingchen sunnyyuqingchen changed the base branch from dev to server-rewrite July 9, 2025 15:05
@lhvy lhvy mentioned this pull request Jul 10, 2025
5 tasks
Number(year),
term,
);
return;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to write return if the function just ends with no return value.

});

if (!timetable) {
throw new ForbiddenException('Timetable does not belong to this user.');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we make all instances of no timetable for userId + timetableId a 404 instead.

@lhvy
Copy link
Contributor

lhvy commented Jul 10, 2025

Please also look over the code + review comments for #1013 and #1018 to see what you do/don't like - feel free to add more comments there, or to update your own code to match conventions with the comments already left.

@lhvy lhvy force-pushed the server-rewrite branch from 39e1bdd to 599672e Compare July 15, 2025 03:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants