2018-02-05 14:16:32 +01:00
|
|
|
'use strict';
|
|
|
|
|
|
|
|
/**
|
|
|
|
* An asynchronous bootstrap function that runs before
|
|
|
|
* your application gets started.
|
|
|
|
*
|
|
|
|
* This gives you an opportunity to set up your data model,
|
|
|
|
* run jobs, or perform some special logic.
|
|
|
|
*/
|
|
|
|
|
|
|
|
module.exports = async cb => {
|
2018-02-06 13:10:43 +01:00
|
|
|
const pluginStore = strapi.store({
|
|
|
|
environment: '',
|
|
|
|
type: 'core'
|
|
|
|
});
|
|
|
|
|
|
|
|
if (!await pluginStore.get({key: 'application'})) {
|
|
|
|
const value = {
|
2018-02-05 14:16:32 +01:00
|
|
|
name: 'Default Application',
|
|
|
|
description: 'This API is going to be awesome!'
|
|
|
|
};
|
|
|
|
|
2018-02-06 13:10:43 +01:00
|
|
|
await pluginStore.set({key: 'application', value});
|
2018-02-05 14:16:32 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
cb();
|
|
|
|
};
|