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:
@@ -20,7 +20,7 @@ instance Controller ApiV2ApiConsumersController where
|
||||
action ApiV2IndexApiConsumersAction = do
|
||||
case requestMethod ?request of
|
||||
"GET" -> listApiConsumers
|
||||
"POST" -> createApiConsumer
|
||||
"POST" -> createApiConsumerRecord
|
||||
_ -> respondWithStatus 405 $ object ["error" .= ("Method not allowed" :: Text)]
|
||||
|
||||
action ApiV2ShowApiConsumerAction { apiConsumerId } = do
|
||||
@@ -28,7 +28,7 @@ instance Controller ApiV2ApiConsumersController where
|
||||
apiConsumer <- fetch apiConsumerId
|
||||
renderJson (apiConsumerToJson apiConsumer)
|
||||
|
||||
action ApiV2CreateApiConsumerAction = createApiConsumer
|
||||
action ApiV2CreateApiConsumerAction = createApiConsumerRecord
|
||||
|
||||
action ApiV2CreateApiConsumerKeyAction { apiConsumerId } = do
|
||||
when (requestMethod ?request /= "POST") do
|
||||
@@ -48,8 +48,8 @@ listApiConsumers = do
|
||||
|> fetch
|
||||
renderJson $ paginatedResponse (map apiConsumerToJson consumers) page perPage total
|
||||
|
||||
createApiConsumer :: (?context :: ControllerContext, ?modelContext :: ModelContext, ?respond :: Respond, ?request :: Request) => IO ()
|
||||
createApiConsumer = do
|
||||
createApiConsumerRecord :: (?context :: ControllerContext, ?modelContext :: ModelContext, ?respond :: Respond, ?request :: Request) => IO ()
|
||||
createApiConsumerRecord = do
|
||||
_consumer <- requireApiConsumer
|
||||
let name = paramOrNothing @Text "name"
|
||||
description = paramOrNothing @Text "description"
|
||||
|
||||
Reference in New Issue
Block a user