fix: parse body not make sense and it would cause JSON parse error

This commit is contained in:
Kuitos 2020-07-06 00:58:55 +08:00
parent 6795ef8f80
commit dbf39fd4a7

View File

@ -10,7 +10,6 @@ async function run(): Promise<void> {
const secretStr = core.getInput('secret')
const ignoreError = core.getInput('ignoreError') === 'true'
const secret = secretStr === '' ? undefined : secretStr
const data = JSON.parse(body)
if (secret) {
core.info('get secret, sign mode')
}
@ -22,7 +21,7 @@ async function run(): Promise<void> {
})
try {
const resp = await dingBot.rawSend(data)
const resp = await dingBot.rawSend(body)
if (resp?.errcode !== 0) {
if (ignoreError) {