strapi/packages/core/admin/strapi-server.js
2023-01-25 19:52:07 +01:00

18 lines
376 B
JavaScript

'use strict';
const _ = require('lodash');
const admin = require('./server');
const mergeRoutes = (a, b, key) => {
return _.isArray(a) && _.isArray(b) && key === 'routes' ? a.concat(b) : undefined;
};
if (strapi.EE) {
const eeAdmin = require('./ee/strapi-server');
module.exports = _.mergeWith({}, admin, eeAdmin, mergeRoutes);
} else {
module.exports = admin;
}