fix(api): unblock production build
Some checks failed
Build and Deploy / build-push-deploy (push) Failing after 8m21s

This commit is contained in:
2026-06-14 14:42:11 +02:00
parent 84ee797e4f
commit a2d0dddddd
6 changed files with 51 additions and 40 deletions

View File

@@ -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"