fix: fix delete services
This commit is contained in:
@@ -572,7 +572,8 @@ const servicesCommand = new Command('services')
|
||||
}
|
||||
}
|
||||
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) {
|
||||
console.log('delete success');
|
||||
} else {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
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) => {
|
||||
if (['start', 'stop', 'restart'].indexOf(action) === -1) {
|
||||
if (['start', 'stop', 'restart', 'removeApp'].indexOf(action) === -1) {
|
||||
throw new Error('Invalid action');
|
||||
}
|
||||
return await query.post({
|
||||
|
||||
Reference in New Issue
Block a user