feat: 接口改为返回JSON
This commit is contained in:
parent
f25c9aaa37
commit
f387806924
@ -97,8 +97,7 @@ const getProjDiffInfo = async () => {
|
||||
return group.slice(0, 5);
|
||||
};
|
||||
|
||||
const sendRobotMsg = async () => {
|
||||
const msgContent = {
|
||||
const getRobotMsg = async () => JSON.stringify({
|
||||
type: "template",
|
||||
data: {
|
||||
template_id: "ctp_AAyVLS6Q37cL",
|
||||
@ -108,13 +107,12 @@ const sendRobotMsg = async () => {
|
||||
group_table: await getProjDiffInfo(),
|
||||
},
|
||||
},
|
||||
};
|
||||
})
|
||||
|
||||
const res = await service.sendMessage(JSON.stringify(msgContent));
|
||||
console.log(res);
|
||||
};
|
||||
const sendRobotMsg = async () => await service.sendMessage(await getRobotMsg())
|
||||
|
||||
const manageRobot = {
|
||||
getRobotMsg,
|
||||
sendRobotMsg,
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user