22 lines
346 B
JavaScript
Raw Normal View History

2021-01-26 10:56:33 +01:00
'use strict';
2021-02-09 15:49:42 +01:00
const { prop } = require('lodash/fp');
2021-01-26 10:56:33 +01:00
2021-06-28 22:37:19 +02:00
const getCoreStore = () => {
return strapi.store({
2021-02-09 11:36:28 +01:00
environment: '',
type: 'plugin',
name: 'i18n',
});
2021-06-28 22:37:19 +02:00
};
2021-02-09 11:36:28 +01:00
2021-01-26 10:56:33 +01:00
// retrieve a local service
const getService = name => {
return prop(`i18n.services.${name}`, strapi.plugins);
};
module.exports = {
getService,
2021-02-09 11:36:28 +01:00
getCoreStore,
2021-01-26 10:56:33 +01:00
};