1
This commit is contained in:
@@ -3,6 +3,7 @@ const db = require('../dbProxy');
|
||||
const jobManager = require('../job/index');
|
||||
const ScheduleUtils = require('./utils');
|
||||
const ScheduleConfig = require('./config');
|
||||
const authorizationService = require('../../services/authorization_service');
|
||||
|
||||
|
||||
/**
|
||||
@@ -91,6 +92,12 @@ class CommandManager {
|
||||
throw new Error(`任务不存在: ${task_id}`);
|
||||
}
|
||||
|
||||
// 1.5 检查账号授权状态
|
||||
const authCheck = await authorizationService.checkAuthorization(task.sn_code, 'sn_code');
|
||||
if (!authCheck.is_authorized) {
|
||||
throw new Error(`授权检查失败: ${authCheck.message}`);
|
||||
}
|
||||
|
||||
// 2. 获取指令信息
|
||||
const command_name = command.command_name || command.name || '未知指令';
|
||||
const command_type = command.command_type || command.type;
|
||||
|
||||
Reference in New Issue
Block a user