fix: payload basic check in GetPacketStatusDepends

This commit is contained in:
pk5ls20 2024-10-26 19:51:43 +08:00
parent d93a280ab3
commit cda5e784f6
No known key found for this signature in database
GPG Key ID: 6370ED7A169F493A

View File

@ -5,16 +5,14 @@ import { ActionName, BaseCheckResult } from '../types';
export abstract class GetPacketStatusDepends<PT, RT> extends BaseAction<PT, RT> {
actionName = ActionName.GetPacketStatus;
protected async check(): Promise<BaseCheckResult>{
protected async check(payload: PT): Promise<BaseCheckResult>{
if (!this.core.apis.PacketApi.available) {
return {
valid: false,
message: "packetServer不可用请参照文档 https://napneko.github.io/config/advanced 检查packetServer状态或进行配置",
};
}
return {
valid: true,
};
return await super.check(payload);
}
}