fix: fix delete services
This commit is contained in:
		| @@ -1,6 +1,6 @@ | ||||
| { | ||||
|   "name": "@kevisual/envision-cli", | ||||
|   "version": "0.0.34", | ||||
|   "version": "0.0.35-alpha.1", | ||||
|   "description": "envision command tools", | ||||
|   "main": "dist/app.mjs", | ||||
|   "type": "module", | ||||
|   | ||||
| @@ -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({ | ||||
|   | ||||
 Submodule submodules/kevisual-query-login updated: 54672a5574...fdf6d3ac0a
									
								
							
		Reference in New Issue
	
	Block a user