forked from Yara724/api
Added AI damage helper
This commit is contained in:
@@ -7,6 +7,13 @@ export function validate(config: Record<string, unknown>) {
|
||||
enableImplicitConversion: true,
|
||||
});
|
||||
|
||||
if (
|
||||
validatedConfig.AI_DAMAGE_ENABLED === "true" &&
|
||||
!validatedConfig.AI_DAMAGE_URL
|
||||
) {
|
||||
throw new Error("AI_DAMAGE_URL is required when AI_DAMAGE_ENABLED=true");
|
||||
}
|
||||
|
||||
const errors = validateSync(validatedConfig, {
|
||||
skipMissingProperties: false,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user