fix: fix delete services
This commit is contained in:
parent
6e410eb3b0
commit
c16c1b3ce4
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@kevisual/envision-cli",
|
"name": "@kevisual/envision-cli",
|
||||||
"version": "0.0.34",
|
"version": "0.0.35-alpha.1",
|
||||||
"description": "envision command tools",
|
"description": "envision command tools",
|
||||||
"main": "dist/app.mjs",
|
"main": "dist/app.mjs",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
|
@ -572,7 +572,8 @@ const servicesCommand = new Command('services')
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (opts.delete) {
|
if (opts.delete) {
|
||||||
const res = await backServices.queryServiceOperate(opts.delete, 'delete');
|
// const res = await backServices.queryServiceOperate(opts.delete, 'delete');
|
||||||
|
const res = await backServices.queryServiceDelect(opts.delete);
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
console.log('delete success');
|
console.log('delete success');
|
||||||
} else {
|
} else {
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
import { query } from '@/module/query.ts';
|
import { query } from '@/module/query.ts';
|
||||||
|
|
||||||
type OperateAction = 'start' | 'stop' | 'restart' | 'reload' | 'delete' | 'update' | 'install' | 'uninstall';
|
type OperateAction = 'start' | 'stop' | 'restart' | 'reload' | 'removeApp' | 'update' | 'install';
|
||||||
export const queryServiceOperate = async (appKey: string, action: OperateAction) => {
|
export const queryServiceOperate = async (appKey: string, action: OperateAction) => {
|
||||||
if (['start', 'stop', 'restart'].indexOf(action) === -1) {
|
if (['start', 'stop', 'restart', 'removeApp'].indexOf(action) === -1) {
|
||||||
throw new Error('Invalid action');
|
throw new Error('Invalid action');
|
||||||
}
|
}
|
||||||
return await query.post({
|
return await query.post({
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit 54672a5574d359220e26ec17c69f567f130d9498
|
Subproject commit fdf6d3ac0a2c12cbac15a50d5089c6497c51a271
|
Loading…
x
Reference in New Issue
Block a user