COPS-IITBHU / hackalog-backend

https://cops-hackalog.herokuapp.com/
5 stars 19 forks source link

submission: improve api response for GET hackathon/{id}/submission #24

Closed m-e-l-u-h-a-n closed 3 years ago

m-e-l-u-h-a-n commented 3 years ago

This implements following rules in get requests for submission: (i) Superuser can get all submissions (in any case). (ii) For ongoing hackathon authenticated users will get submissions of their team. (iii) For ongoing hackathon unauthenticated users will get ERROR 401 Unauthorized. (iv) If hackathon is not ongoing then anyone(even unauthenticated) will get all the submissions.