Skip to content

Commit

Permalink
Feature v4.18.5 rollback (#53)
Browse files Browse the repository at this point in the history
* fix: use axios instead of request

* fix: Optimize the writing of axios

Co-authored-by: zhang lay <lay.zhang@shopee.com>
  • Loading branch information
zhanglei66 and zhang lay committed Mar 1, 2022
1 parent 7be29ca commit 01255f5
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions scripts/notice-seaTalk.js
@@ -1,26 +1,26 @@
const path = require('path');
const request = require('request');
const axios = require('axios');

const cwd = process.cwd();

const { version } = require(path.resolve(cwd, 'package.json'));
const seatalkUrl = 'https://openapi.seatalk.io/webhook/group/_mh_SKGeQruZ49eX4CzqQw';

function noticeSeaTalk() {
request({
url: 'https://openapi.seatalk.io/webhook/group/_mh_SKGeQruZ49eX4CzqQw',
method: 'POST',
json: true,
headers: {
'content-type': 'application/json',
},
body: {
axios
.post(seatalkUrl, {
tag: 'text',
text: {
content: `Hello, everyone! Infrad has released version ${version}, Please check the update details from https://bolifestudio.com/changelog-cn`,
at_all: true,
},
},
});
})
.then(res => {
console.log('Successful notice in seatalk.');
})
.catch(e => {
console.log(e);
});
}

noticeSeaTalk();

0 comments on commit 01255f5

Please sign in to comment.