mirror of
https://github.com/EvolutionAPI/evolution-manager.git
synced 2025-12-19 11:32:18 -06:00
doc and other commands
This commit is contained in:
18
lib/api/changeVersion.js
Normal file
18
lib/api/changeVersion.js
Normal file
@@ -0,0 +1,18 @@
|
||||
const verifyEvolutionInstallation = require('../utils/verifyEvolutionInstallation.js');
|
||||
const revertToVersion = require('../utils/revertToVersion.js');
|
||||
|
||||
module.exports = async (argv) => {
|
||||
const { v } = argv || {}
|
||||
if (!v) throw new Error('❌ Please specify a version to revert to. Example: evolution-manager api revert --v=1.5.0')
|
||||
|
||||
const isEvolutionInstalled = verifyEvolutionInstallation();
|
||||
if (!isEvolutionInstalled) return;
|
||||
|
||||
|
||||
|
||||
console.log(`🔃 Reverting to Evolution-Api v${v}...`);
|
||||
await revertToVersion(v);
|
||||
console.log(`🔃 Reverted to Evolution-Api v${v} successfully`);
|
||||
|
||||
console.log('\n🔁 Please restart the process to use the reverted version\n')
|
||||
};
|
||||
Reference in New Issue
Block a user