diff --git a/node_modules/.package-lock.json b/node_modules/.package-lock.json index e2c6e90..3d56d59 100644 --- a/node_modules/.package-lock.json +++ b/node_modules/.package-lock.json @@ -33,9 +33,9 @@ } }, "node_modules/@cinotify/js": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@cinotify/js/-/js-1.3.0.tgz", - "integrity": "sha512-r9+Te5+2MPHWsqE0kQB/0IgsgBUd1ypdzeexTTURrV5d29Y48l3w4eJKnq1zAc0PYM0HQocqUb6DgfYocweHMQ==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@cinotify/js/-/js-1.4.0.tgz", + "integrity": "sha512-4dpmRmdIcmoqSRhk8U06b+lb4+E3m1vlhCGe6JCC7Gf+sBhpngVmXAqO53Bm5PU4H4PqeSJl2NT7vQa+/UOvFQ==", "dependencies": { "axios": "^0.24.0", "mime": "^3.0.0" diff --git a/node_modules/@cinotify/js/index.js b/node_modules/@cinotify/js/index.js index 50cfc89..cf64634 100644 --- a/node_modules/@cinotify/js/index.js +++ b/node_modules/@cinotify/js/index.js @@ -1,9 +1,13 @@ const http = require('axios'); module.exports.email = ({ to, subject, body, attachments }) => { - const payload = {to, subject, body} - if(attachments) { + const payload = { to, subject, body } + if (attachments) { payload.attachments = attachments } return http.post('https://www.cinotify.cc/api/notify', payload) + .catch(err => { + console.error(err.response.data.error) + throw new Error(err) + }) } diff --git a/node_modules/@cinotify/js/package.json b/node_modules/@cinotify/js/package.json index 2d03c95..e674fa6 100644 --- a/node_modules/@cinotify/js/package.json +++ b/node_modules/@cinotify/js/package.json @@ -1,6 +1,6 @@ { "name": "@cinotify/js", - "version": "1.3.0", + "version": "1.4.0", "main": "index.js", "scripts": { "test": "jest" diff --git a/package-lock.json b/package-lock.json index 7ae4f5f..6113beb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,7 +11,7 @@ "dependencies": { "@actions/core": "^1.10.0", "@actions/github": "^5.1.1", - "@cinotify/js": "^1.3.0", + "@cinotify/js": "^1.4.0", "mime": "^3.0.0" } }, @@ -44,9 +44,9 @@ } }, "node_modules/@cinotify/js": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@cinotify/js/-/js-1.3.0.tgz", - "integrity": "sha512-r9+Te5+2MPHWsqE0kQB/0IgsgBUd1ypdzeexTTURrV5d29Y48l3w4eJKnq1zAc0PYM0HQocqUb6DgfYocweHMQ==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@cinotify/js/-/js-1.4.0.tgz", + "integrity": "sha512-4dpmRmdIcmoqSRhk8U06b+lb4+E3m1vlhCGe6JCC7Gf+sBhpngVmXAqO53Bm5PU4H4PqeSJl2NT7vQa+/UOvFQ==", "dependencies": { "axios": "^0.24.0", "mime": "^3.0.0" @@ -312,9 +312,9 @@ } }, "@cinotify/js": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@cinotify/js/-/js-1.3.0.tgz", - "integrity": "sha512-r9+Te5+2MPHWsqE0kQB/0IgsgBUd1ypdzeexTTURrV5d29Y48l3w4eJKnq1zAc0PYM0HQocqUb6DgfYocweHMQ==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@cinotify/js/-/js-1.4.0.tgz", + "integrity": "sha512-4dpmRmdIcmoqSRhk8U06b+lb4+E3m1vlhCGe6JCC7Gf+sBhpngVmXAqO53Bm5PU4H4PqeSJl2NT7vQa+/UOvFQ==", "requires": { "axios": "^0.24.0", "mime": "^3.0.0" diff --git a/package.json b/package.json index ed6ec57..bf9c839 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "dependencies": { "@actions/core": "^1.10.0", "@actions/github": "^5.1.1", - "@cinotify/js": "^1.3.0", + "@cinotify/js": "^1.4.0", "mime": "^3.0.0" } }