Skip to content

Commit

Permalink
fix: for discord webhook in the notify.js in server directory, changi…
Browse files Browse the repository at this point in the history
…ng the return value from response body to statusText to avoid empty string. (#2215)

Co-authored-by: Huang Chuan <river1440>
  • Loading branch information
river1440-ce authored Dec 24, 2023
1 parent 51e6bb6 commit 6f82fa9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/server/src/service/notify.js
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,9 @@ module.exports = class extends think.Service {
method: 'POST',
header: form.getHeaders(),
body: form,
}).then((resp) => resp.json());
}).then((resp) => resp.statusText);
// Expected return value: No Content
// Since Discord doesn't return any response body on success, we just return the status text.
}

async lark({ title, content }, self, parent) {
Expand Down

0 comments on commit 6f82fa9

Please sign in to comment.