mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 14:20:44 +00:00
fix(secrets): narrow inactive variant test helper types
This commit is contained in:
@@ -13,15 +13,19 @@ if (
|
||||
throw new Error("Missing channel secret contract api");
|
||||
}
|
||||
|
||||
const googleChatAssignments = googleChatSecrets.collectRuntimeConfigAssignments;
|
||||
const ircAssignments = ircSecrets.collectRuntimeConfigAssignments;
|
||||
const slackAssignments = slackSecrets.collectRuntimeConfigAssignments;
|
||||
|
||||
function resolveAssignments(id: string) {
|
||||
if (id === "irc") {
|
||||
return ircSecrets.collectRuntimeConfigAssignments;
|
||||
return ircAssignments;
|
||||
}
|
||||
if (id === "slack") {
|
||||
return slackSecrets.collectRuntimeConfigAssignments;
|
||||
return slackAssignments;
|
||||
}
|
||||
if (id === "googlechat") {
|
||||
return googleChatSecrets.collectRuntimeConfigAssignments;
|
||||
return googleChatAssignments;
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user