mirror of
https://github.com/strapi/strapi.git
synced 2025-09-25 16:29:34 +00:00
Delete previous application
This commit is contained in:
parent
7c0a0b16c5
commit
44e510f68b
@ -35,7 +35,9 @@ const logger = new (winston.Logger)({
|
||||
module.exports = function () {
|
||||
const HOME = process.env[process.platform === 'win32' ? 'USERPROFILE' : 'HOME'];
|
||||
const pathToPackageJSON = path.resolve(process.cwd(), 'package.json');
|
||||
const pathToStudioJSON = path.resolve(process.cwd(), 'config', 'studio.json');
|
||||
const appPkg = JSON.parse(fs.readFileSync(pathToPackageJSON));
|
||||
const studioConfig = JSON.parse(fs.readFileSync(pathToStudioJSON));
|
||||
let invalidPackageJSON;
|
||||
|
||||
// First, check if we are in a Strapi project.
|
||||
@ -86,7 +88,8 @@ module.exports = function () {
|
||||
uri: 'http://studio.strapi.io/app',
|
||||
body: {
|
||||
name: appPkg.name,
|
||||
token: config.token
|
||||
token: config.token,
|
||||
appToDelete: studioConfig.studio.appId
|
||||
}
|
||||
},
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user