@lvdniet/strapi-plugin-vercel-deploy
Version:
Strapi v4 plugin to trigger and monitor a deployment on Vercel
41 lines (33 loc) • 869 B
JavaScript
;
module.exports = {
async runDeploy(ctx) {
const response = await strapi
.plugin("vercel-deploy")
.service("deploy")
.runDeploy();
if (response.error) {
return ctx.internalServerError(`Server error: ${response.error}`);
}
ctx.body = response;
},
async getDeployments(ctx) {
const response = await strapi
.plugin("vercel-deploy")
.service("deploy")
.getDeployments();
if (response.error) {
return ctx.internalServerError(`Server error: ${response.error}`);
}
ctx.body = response;
},
deployAvailability(ctx) {
const response = strapi
.plugin("vercel-deploy")
.service("deploy")
.deployAvailability();
if (response.error) {
return ctx.internalServerError(`Server error: ${response.error}`);
}
ctx.body = response;
},
};