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 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"
|
||||
|
||||
Reference in New Issue
Block a user