generated from coulomb/repo-seed
fix(api): unblock production build
Some checks failed
Build and Deploy / build-push-deploy (push) Failing after 8m21s
Some checks failed
Build and Deploy / build-push-deploy (push) Failing after 8m21s
This commit is contained in:
@@ -17,7 +17,7 @@ instance Controller ApiV2AnnotationsController where
|
||||
action ApiV2IndexAnnotationsAction = do
|
||||
case requestMethod ?request of
|
||||
"GET" -> listAnnotations
|
||||
"POST" -> createAnnotation
|
||||
"POST" -> createApiAnnotation
|
||||
_ -> respondWithStatus 405 $ object ["error" .= ("Method not allowed" :: Text)]
|
||||
|
||||
action ApiV2ShowAnnotationAction { annotationId } = do
|
||||
@@ -26,7 +26,7 @@ instance Controller ApiV2AnnotationsController where
|
||||
renderJson (annotationToJson ann)
|
||||
|
||||
-- POST /api/v2/annotations
|
||||
action ApiV2CreateAnnotationAction = createAnnotation
|
||||
action ApiV2CreateAnnotationAction = createApiAnnotation
|
||||
|
||||
listAnnotations :: (?context :: ControllerContext, ?modelContext :: ModelContext, ?respond :: Respond, ?request :: Request) => IO ()
|
||||
listAnnotations = do
|
||||
@@ -46,8 +46,8 @@ listAnnotations = do
|
||||
anns <- q2 |> limit perPage |> offset off |> fetch
|
||||
renderJson $ paginatedResponse (map annotationToJson anns) page perPage total
|
||||
|
||||
createAnnotation :: (?context :: ControllerContext, ?modelContext :: ModelContext, ?respond :: Respond, ?request :: Request) => IO ()
|
||||
createAnnotation = do
|
||||
createApiAnnotation :: (?context :: ControllerContext, ?modelContext :: ModelContext, ?respond :: Respond, ?request :: Request) => IO ()
|
||||
createApiAnnotation = do
|
||||
_consumer <- requireApiConsumer
|
||||
let widgetIdText = paramOrNothing @Text "widgetId"
|
||||
category = paramOrNothing @Text "category"
|
||||
|
||||
Reference in New Issue
Block a user