strapi-to-lokalise-plugin
Version:
Preview and sync Lokalise translations from Strapi admin
17 lines (12 loc) • 587 B
JavaScript
;
// Strapi v4 Admin Routes Wrapper
// This wraps the plain array routes with { type: 'admin', routes: [...] }
// This format is required by Strapi v4 when exporting from server/routes/index.js
// Matches official plugin structure: server/routes/admin/index.js exports { type: 'admin', routes: [...] }
const routes = require('./admin-v4.js');
// CRITICAL: Export as { type: 'admin', routes: [...] } for Strapi v4
// This makes routes accessible at /admin/api/lokalise-sync/* (not /lokalise-sync/*)
module.exports = {
type: 'admin',
routes: routes,
};