feat: fully functioning ALB

This commit is contained in:
Zakaria
2026-09-26 16:14:24 -04:00
parent 093afb9b2b
commit 8470b8d17a
44 changed files with 2076 additions and 132 deletions
+12 -1
View File
@@ -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)
})
})