Just score API interface
This commit is contained in:
parent
765b31447b
commit
1b3a55ae12
@ -199,8 +199,7 @@ instance Yesod App where
|
|||||||
|
|
||||||
isAuthorized (ChallengeImageR _) _ = return Authorized
|
isAuthorized (ChallengeImageR _) _ = return Authorized
|
||||||
|
|
||||||
isAuthorized (ApiTxtScoreMainMetricR _) _ = return Authorized
|
isAuthorized (ApiTxtScoreR _) _ = return Authorized
|
||||||
isAuthorized (ApiTxtScoreWithMetricR _ _) _ = return Authorized
|
|
||||||
|
|
||||||
isAuthorized (ChallengeParamGraphDataR _ _ _) _ = return Authorized
|
isAuthorized (ChallengeParamGraphDataR _ _ _) _ = return Authorized
|
||||||
isAuthorized (IndicatorGraphDataR _) _ = return Authorized
|
isAuthorized (IndicatorGraphDataR _) _ = return Authorized
|
||||||
|
@ -59,11 +59,12 @@ fetchSubmissionByOut (Entity _ out) = do
|
|||||||
fsi <- getFullInfo theSubmissionEnt
|
fsi <- getFullInfo theSubmissionEnt
|
||||||
return (fsi, outChecksum out)
|
return (fsi, outChecksum out)
|
||||||
|
|
||||||
getApiTxtScoreMainMetricR :: Text -> Handler Text
|
getApiTxtScoreR :: Text -> Handler Text
|
||||||
getApiTxtScoreMainMetricR sha1Prefix = getApiTxtScore Nothing sha1Prefix
|
getApiTxtScoreR query =
|
||||||
|
if T.null post
|
||||||
getApiTxtScoreWithMetricR :: Text -> Text -> Handler Text
|
then getApiTxtScore Nothing pre
|
||||||
getApiTxtScoreWithMetricR sha1Prefix metricName = getApiTxtScore (Just metricName) sha1Prefix
|
else getApiTxtScore (Just $ T.tail post) pre
|
||||||
|
where (pre, post) = T.breakOn "-" query
|
||||||
|
|
||||||
getApiTxtScore :: Maybe Text -> Text -> Handler Text
|
getApiTxtScore :: Maybe Text -> Text -> Handler Text
|
||||||
getApiTxtScore mMetricName sha1Prefix = do
|
getApiTxtScore mMetricName sha1Prefix = do
|
||||||
|
@ -34,8 +34,7 @@
|
|||||||
|
|
||||||
/view-variant/#VariantId ViewVariantR GET
|
/view-variant/#VariantId ViewVariantR GET
|
||||||
|
|
||||||
/api/txt/score/#Text ApiTxtScoreMainMetricR GET
|
/api/txt/score/#Text ApiTxtScoreR GET
|
||||||
/api/txt/score/#Text/#Text ApiTxtScoreWithMetricR GET
|
|
||||||
|
|
||||||
/make-public/#SubmissionId MakePublicR GET
|
/make-public/#SubmissionId MakePublicR GET
|
||||||
/hide-submission/#SubmissionId HideSubmissionR GET
|
/hide-submission/#SubmissionId HideSubmissionR GET
|
||||||
|
Loading…
Reference in New Issue
Block a user