mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
center: add notification push support
This commit is contained in:
2 files changed
+3
-1
No files matched your search
@@ -63,6 +63,7 @@ class DataReportHandler extends Handler {
|
|||||||
sandbox: payload.sandbox,
|
sandbox: payload.sandbox,
|
||||||
dbVersion: payload.dbVersion,
|
dbVersion: payload.dbVersion,
|
||||||
};
|
};
|
||||||
|
if (old.notification) setPayload.notification = '';
|
||||||
if (old && lt(payload.version, old.version)) {
|
if (old && lt(payload.version, old.version)) {
|
||||||
await coll.updateOne(
|
await coll.updateOne(
|
||||||
{ _id: installId },
|
{ _id: installId },
|
||||||
@@ -85,6 +86,7 @@ class DataReportHandler extends Handler {
|
|||||||
this.ctx.emit('center/report', this, installId, old, payload);
|
this.ctx.emit('center/report', this, installId, old, payload);
|
||||||
// TODO deliver messages
|
// TODO deliver messages
|
||||||
this.response.body = { code: 0 };
|
this.response.body = { code: 0 };
|
||||||
|
if (old.notification) this.response.body.notification = old.notification;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@hydrooj/center",
|
"name": "@hydrooj/center",
|
||||||
"version": "0.2.7",
|
"version": "0.2.8",
|
||||||
"main": "index.ts",
|
"main": "index.ts",
|
||||||
"repository": "https://github.com/hydro-dev/Hydro.git",
|
"repository": "https://github.com/hydro-dev/Hydro.git",
|
||||||
"author": "undefined <i@undefined.moe>",
|
"author": "undefined <i@undefined.moe>",
|
||||||
|
|||||||
Reference in new issue
Block a user