generated from coulomb/repo-seed
feat: add v2 hub and widget create endpoints
Some checks failed
Build and Deploy / build-push-deploy (push) Has been cancelled
Some checks failed
Build and Deploy / build-push-deploy (push) Has been cancelled
This commit is contained in:
@@ -89,6 +89,7 @@ instance CanRoute ApiV2WidgetsController where
|
||||
instance HasPath ApiV2WidgetsController where
|
||||
pathTo ApiV2IndexWidgetsAction = "/api/v2/widgets"
|
||||
pathTo ApiV2ShowWidgetAction { widgetId } = "/api/v2/widgets/" <> tshow widgetId
|
||||
pathTo ApiV2CreateWidgetAction = "/api/v2/widgets"
|
||||
|
||||
instance CanRoute ApiV2InteractionEventsController where
|
||||
parseRoute' = do
|
||||
@@ -242,6 +243,20 @@ instance HasPath ApiV2HubRegistryController where
|
||||
pathTo ApiV2IndexHubRegistryAction = "/api/v2/hub-registry"
|
||||
pathTo ApiV2ShowHubRegistryAction { hubId } = "/api/v2/hub-registry/" <> tshow hubId
|
||||
|
||||
instance CanRoute ApiV2HubsController where
|
||||
parseRoute' = do
|
||||
_ <- string "/api/v2/hubs"
|
||||
choice
|
||||
[ do endOfInput; pure ApiV2IndexHubsAction
|
||||
, do _ <- string "/"; hId <- parseUUID; endOfInput
|
||||
pure ApiV2ShowHubAction { hubId = Id hId }
|
||||
]
|
||||
|
||||
instance HasPath ApiV2HubsController where
|
||||
pathTo ApiV2IndexHubsAction = "/api/v2/hubs"
|
||||
pathTo ApiV2ShowHubAction { hubId } = "/api/v2/hubs/" <> tshow hubId
|
||||
pathTo ApiV2CreateHubAction = "/api/v2/hubs"
|
||||
|
||||
instance CanRoute ApiV2WidgetPatternsController where
|
||||
parseRoute' = do
|
||||
_ <- string "/api/v2/widget-patterns"
|
||||
|
||||
Reference in New Issue
Block a user