UNPKG

@akemona-org/strapi

Version:

An open source headless CMS solution to create and manage your own API. It provides a powerful dashboard and features to make your life easier. Databases supported: MongoDB, MySQL, MariaDB, PostgreSQL, SQLite

19 lines (15 loc) 367 B
'use strict'; const _ = require('lodash'); module.exports = (strapi) => { return { initialize() { strapi.app.use(async (ctx, next) => { await next(); const responseFn = strapi.config.get(['functions', 'responses', ctx.status]); if (_.isFunction(responseFn)) { await responseFn(ctx); } }); }, }; };