chore: add getCFavouriteR handler+route
This commit is contained in:
parent
16abbc5da9
commit
45fd92aa04
2
routes
2
routes
@ -174,7 +174,7 @@
|
||||
!/course/new CourseNewR GET POST !lecturer
|
||||
/course/#TermId/#SchoolId/#CourseShorthand CourseR !lecturer:
|
||||
/ CShowR GET !tutor !corrector !exam-corrector !course-registered !course-time !evaluation !exam-office !allocation-admin
|
||||
/favourite CFavouriteR POST !free
|
||||
/favourite CFavouriteR GET POST !free
|
||||
/register CRegisterR GET POST !timeANDcapacityANDallocation-timeAND¬course-registeredANDcourse-time !timeANDallocation-timeAND¬exam-resultANDcourse-registered !lecturerANDallocation-time
|
||||
/register-template CRegisterTemplateR GET !course-time
|
||||
/edit CEditR GET POST
|
||||
|
||||
@ -34,6 +34,9 @@ getCNotesR, postCNotesR :: TermId -> SchoolId -> CourseShorthand -> Handler Html
|
||||
getCNotesR = postCNotesR
|
||||
postCNotesR _ _ _ = defaultLayout [whamlet|You have corrector access to this course.|]
|
||||
|
||||
-- simple redirect for now to avoid running into HTTP method not supported.
|
||||
getCFavouriteR :: TermId -> SchoolId -> CourseShorthand -> Handler ()
|
||||
getCFavouriteR tid ssh csh = redirect $ CourseR tid ssh csh CShowR
|
||||
postCFavouriteR :: TermId -> SchoolId -> CourseShorthand -> Handler ()
|
||||
postCFavouriteR tid ssh csh = void $ do
|
||||
authPair@(uid, _) <- requireAuthPair
|
||||
|
||||
Loading…
Reference in New Issue
Block a user