forked from wangziqi/gongxue-base
fix(integration): simplify manual DingTalk sync setup
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
export interface DingTalkConfigFormValues {
|
||||
agentId: string;
|
||||
appSecret?: string;
|
||||
corpId: string;
|
||||
}
|
||||
|
||||
export const isAppSecretRequired = (hasSavedConfig: boolean) => !hasSavedConfig;
|
||||
|
||||
export const buildDingTalkConfigPayload = (values: DingTalkConfigFormValues) => ({
|
||||
corpId: values.corpId.trim(),
|
||||
agentId: values.agentId.trim(),
|
||||
appSecret: values.appSecret?.trim() || undefined,
|
||||
});
|
||||
Reference in New Issue
Block a user