mirror of
https://gitee.com/wanwujie/sub2api
synced 2026-04-21 15:14:46 +08:00
12 lines
287 B
TypeScript
12 lines
287 B
TypeScript
|
|
export function applyInterceptWarmup(
|
||
|
|
credentials: Record<string, unknown>,
|
||
|
|
enabled: boolean,
|
||
|
|
mode: 'create' | 'edit'
|
||
|
|
): void {
|
||
|
|
if (enabled) {
|
||
|
|
credentials.intercept_warmup_requests = true
|
||
|
|
} else if (mode === 'edit') {
|
||
|
|
delete credentials.intercept_warmup_requests
|
||
|
|
}
|
||
|
|
}
|