UNPKG

@code-mancers/strapi-plugin-multi-site-vercel-deploy

Version:

Strapi v4 plugin to trigger and monitor deployment of multiple applications on Vercel

41 lines (33 loc) 968 B
"use strict"; module.exports = { async runDeploy(ctx) { const response = await strapi .plugin("multi-site-vercel-deploy") .service("deploy") .runDeploy(ctx.request.query.site); if (response.error) { return ctx.internalServerError(`Server error: ${response.error}`); } ctx.body = response; }, async getDeployments(ctx) { const response = await strapi .plugin("multi-site-vercel-deploy") .service("deploy") .getDeployments(ctx.request.query.site); if (response.error) { return ctx.internalServerError(`Server error: ${response.error}`); } ctx.body = response; }, deployAvailability(ctx) { const response = strapi .plugin("multi-site-vercel-deploy") .service("deploy") .deployAvailability(ctx.request.query.site); if (response.error) { return ctx.internalServerError(`Server error: ${response.error}`); } ctx.body = response; }, };