Compare commits

...

3 Commits

Author SHA1 Message Date
Frank Elsinga
d3144dcd61
Merge branch 'master' into pushplus 2025-03-25 00:53:47 +01:00
Frank Elsinga
9b78f6c988
Change formatting 2025-03-25 00:53:29 +01:00
Louis Lam
10a518e72e
Fix #5721: Change proxy port column type to integer to support larger port numbers (#5724) 2025-03-25 02:07:15 +08:00
2 changed files with 21 additions and 5 deletions

View File

@ -0,0 +1,13 @@
// Fix #5721: Change proxy port column type to integer to support larger port numbers
exports.up = function (knex) {
return knex.schema
.alterTable("proxy", function (table) {
table.integer("port").alter();
});
};
exports.down = function (knex) {
return knex.schema.alterTable("proxy", function (table) {
table.smallint("port").alter();
});
};

View File

@ -17,15 +17,18 @@ class PushPlus extends NotificationProvider {
const okMsg = "Sent Successfully.";
const url = "https://www.pushplus.plus/send";
try {
await axios.post(url, {
const config = {
headers: {
"Content-Type": "application/json",
},
};
const params = {
"token": notification.pushPlusSendKey,
"title": this.checkStatus(heartbeatJSON, monitorJSON),
"content": msg,
"template": "html"
}, { headers: { "Content-Type": "application/json" } }
);
return okMsg;
};
await axios.post(url, params, config);
} catch (error) {
this.throwGeneralAxiosError(error);
console.error("PushPlus Error:", error.response?.data || error.message);