routes/apps.ts: Implement /api/applications endpoint

This commit is contained in:
Anmol Sethi
2020-11-03 21:14:14 -05:00
parent afff86ae9c
commit e03bbe3149
2 changed files with 14 additions and 0 deletions

12
src/node/routes/apps.ts Normal file
View File

@ -0,0 +1,12 @@
import * as express from "express"
import { PluginAPI } from "../plugin"
export function router(papi: PluginAPI): express.Router {
const router = express.Router()
router.get("/", async (req, res) => {
res.json(await papi.applications())
})
return router
}