Skip to content

Commit

Permalink
perf: config 接口添加权限验证
Browse files Browse the repository at this point in the history
  • Loading branch information
Chanzhaoyu authored and jingChen55 committed Mar 27, 2023
1 parent 02df7c6 commit 64c19ea
Showing 1 changed file with 1 addition and 21 deletions.
22 changes: 1 addition & 21 deletions service/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,27 +36,7 @@ router.post('/chat-process', auth, async (req, res) => {
}
})

router.post('/larkMsg', auth, (req, res) => {
const { challenge, event, header } = req.body

if (challenge) {
res.json({ challenge })
res.end()
}
switch (header.event_type) {
case 'im.message.receive_v1':
sendMessage({
message_id: event.message.message_id,
data: {
content: '',
msg_type: 'post',
},
})
break
}
})

router.post('/config', async (req, res) => {
router.post('/config', auth, async (req, res) => {
try {
const response = await chatConfig()
res.send(response)
Expand Down

0 comments on commit 64c19ea

Please sign in to comment.