Update server/notification-providers/dingding.js

Co-authored-by: Adam Stachowicz <saibamenppl@gmail.com>
This commit is contained in:
xJoker 2021-10-14 07:34:45 +08:00 committed by GitHub
parent 2d471a5e84
commit 6e04ec436e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -59,7 +59,7 @@ class DingDing extends NotificationProvider {
/** DingDing sign */
sign(timestamp,secretKey) {
return Crypto
.createHmac("sha256",Buffer.from(secretKey, 'utf8'))
.createHmac("sha256", Buffer.from(secretKey, 'utf8'))
.update(Buffer.from(`${timestamp}\n${secretKey}`, 'utf8'))
.digest("base64");
}