1
0
Fork 0
mirror of synced 2024-06-22 16:10:40 +12:00
budibase/packages/server/src/api/controllers/integration.js

15 lines
308 B
JavaScript
Raw Normal View History

const { getDefinitions } = require("../../integrations")
2020-11-27 03:43:56 +13:00
2021-05-03 19:31:09 +12:00
exports.fetch = async function (ctx) {
2020-11-27 03:43:56 +13:00
ctx.status = 200
const defs = await getDefinitions()
ctx.body = defs
2020-11-27 03:43:56 +13:00
}
2020-12-19 07:19:43 +13:00
2021-05-03 19:31:09 +12:00
exports.find = async function (ctx) {
const defs = await getDefinitions()
2020-12-19 07:19:43 +13:00
ctx.status = 200
ctx.body = defs[ctx.params.type]
2020-12-19 07:19:43 +13:00
}