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:
@@ -15,7 +15,7 @@ instance Controller ApiV2HubsController where
|
||||
action ApiV2IndexHubsAction = do
|
||||
case requestMethod ?request of
|
||||
"GET" -> listHubs
|
||||
"POST" -> createHub
|
||||
"POST" -> createApiHub
|
||||
_ -> respondWithStatus 405 $ object ["error" .= ("Method not allowed" :: Text)]
|
||||
|
||||
action ApiV2ShowHubAction { hubId } = do
|
||||
@@ -23,7 +23,7 @@ instance Controller ApiV2HubsController where
|
||||
hub <- fetch hubId
|
||||
renderJson (hubToJson hub)
|
||||
|
||||
action ApiV2CreateHubAction = createHub
|
||||
action ApiV2CreateHubAction = createApiHub
|
||||
|
||||
listHubs :: (?context :: ControllerContext, ?modelContext :: ModelContext, ?respond :: Respond, ?request :: Request) => IO ()
|
||||
listHubs = do
|
||||
@@ -38,8 +38,8 @@ listHubs = do
|
||||
|> fetch
|
||||
renderJson $ paginatedResponse (map hubToJson hubs) page perPage total
|
||||
|
||||
createHub :: (?context :: ControllerContext, ?modelContext :: ModelContext, ?respond :: Respond, ?request :: Request) => IO ()
|
||||
createHub = do
|
||||
createApiHub :: (?context :: ControllerContext, ?modelContext :: ModelContext, ?respond :: Respond, ?request :: Request) => IO ()
|
||||
createApiHub = do
|
||||
_consumer <- requireApiConsumer
|
||||
let slug = paramOrNothing @Text "slug"
|
||||
name = paramOrNothing @Text "name"
|
||||
|
||||
Reference in New Issue
Block a user