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 ApiV2WidgetsController where
action ApiV2IndexWidgetsAction = do
case requestMethod ?request of
"GET" -> listWidgets
"POST" -> createWidget
"POST" -> createApiWidget
_ -> respondWithStatus 405 $ object ["error" .= ("Method not allowed" :: Text)]
action ApiV2ShowWidgetAction { widgetId } = do
@@ -25,7 +25,7 @@ instance Controller ApiV2WidgetsController where
widget <- fetch widgetId
renderJson (widgetToJson widget)
action ApiV2CreateWidgetAction = createWidget
action ApiV2CreateWidgetAction = createApiWidget
listWidgets :: (?context :: ControllerContext, ?modelContext :: ModelContext, ?respond :: Respond, ?request :: Request) => IO ()
listWidgets = do
@@ -40,8 +40,8 @@ listWidgets = do
|> fetch
renderJson $ paginatedResponse (map widgetToJson widgets) page perPage total
createWidget :: (?context :: ControllerContext, ?modelContext :: ModelContext, ?respond :: Respond, ?request :: Request) => IO ()
createWidget = do
createApiWidget :: (?context :: ControllerContext, ?modelContext :: ModelContext, ?respond :: Respond, ?request :: Request) => IO ()
createApiWidget = do
_consumer <- requireApiConsumer
let hubIdText = paramOrNothing @Text "hubId"
name = paramOrNothing @Text "name"