Fix end-point for making a submission public

This commit is contained in:
Filip Gralinski 2021-09-25 15:12:51 +02:00
parent dcd30b6ccd
commit 1f2a923d9e
2 changed files with 4 additions and 0 deletions

View File

@ -181,6 +181,7 @@ instance Yesod App where
isAuthorized UserInfoR _ = return Authorized
isAuthorized MyEvaluationTriggerTokenJsonR _ = return Authorized
isAuthorized (ChallengeSubmissionJsonR _) _ = return Authorized
isAuthorized (MakePublicJsonR _) _ = return Authorized
isAuthorized (ChallengeReadmeInMarkdownR _) _ = regularAuthorization
isAuthorized (QueryJsonR _) _ = regularAuthorization
isAuthorized ListTagsJsonR _ = regularAuthorization

View File

@ -192,6 +192,9 @@
<p><input type="text" id="challengeId" value="specify challenge ID here"/><button onclick="loadData('challenge-my-submissions/' + document.getElementById('challengeId').value)">Test
showing user's submissions</button></p>
<p><input type="text" id="submissionId" value="specify submission ID here"/><button onclick="loadData('make-public/' + document.getElementById('submissionId').value)">Test
opening submissions</button></p>
<p><button onclick="loadData('list-challenges')">Yet another
test</button></p>