feat: fully functioning ALB
This commit is contained in:
@@ -82,6 +82,14 @@ export function createCloudRoutes(injectedService?: CloudProxyService) {
|
||||
return c.json(schema)
|
||||
})
|
||||
|
||||
app.get('/:cloud/services/:service/dependencies', async (c) => {
|
||||
const cloud = c.req.param('cloud') as CloudProvider
|
||||
const serviceType = c.req.param('service') as CloudServiceType
|
||||
if (!isCloudProvider(cloud) || !isServiceType(serviceType)) return c.json({error: 'Unknown cloud or service'}, 404)
|
||||
|
||||
return withRuntime(c, async () => c.json(await svc(c).dependencies(cloud, serviceType)))
|
||||
})
|
||||
|
||||
app.get('/:cloud/services/database/snapshots', async (c) => {
|
||||
const cloud = c.req.param('cloud') as CloudProvider
|
||||
if (!isCloudProvider(cloud)) return c.json({error: 'Unknown cloud'}, 404)
|
||||
@@ -119,7 +127,10 @@ export function createCloudRoutes(injectedService?: CloudProxyService) {
|
||||
if (!isCloudProvider(cloud) || !isServiceType(serviceType)) return c.json({error: 'Unknown cloud or service'}, 404)
|
||||
|
||||
return withRuntime(c, async () => {
|
||||
const resources = await svc(c).listResources(cloud, serviceType, {search: c.req.query('search')})
|
||||
const resources = await svc(c).listResources(cloud, serviceType, {
|
||||
search: c.req.query('search'),
|
||||
state: c.req.query('state'),
|
||||
})
|
||||
return c.json(resources)
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user