mirror of
https://github.com/strapi/strapi.git
synced 2025-09-26 17:00:55 +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 () {
|
module.exports = function () {
|
||||||
const HOME = process.env[process.platform === 'win32' ? 'USERPROFILE' : 'HOME'];
|
const HOME = process.env[process.platform === 'win32' ? 'USERPROFILE' : 'HOME'];
|
||||||
const pathToPackageJSON = path.resolve(process.cwd(), 'package.json');
|
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 appPkg = JSON.parse(fs.readFileSync(pathToPackageJSON));
|
||||||
|
const studioConfig = JSON.parse(fs.readFileSync(pathToStudioJSON));
|
||||||
let invalidPackageJSON;
|
let invalidPackageJSON;
|
||||||
|
|
||||||
// First, check if we are in a Strapi project.
|
// First, check if we are in a Strapi project.
|
||||||
@ -86,7 +88,8 @@ module.exports = function () {
|
|||||||
uri: 'http://studio.strapi.io/app',
|
uri: 'http://studio.strapi.io/app',
|
||||||
body: {
|
body: {
|
||||||
name: appPkg.name,
|
name: appPkg.name,
|
||||||
token: config.token
|
token: config.token,
|
||||||
|
appToDelete: studioConfig.studio.appId
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user