mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 09:36:08 +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,
|
||||
dbVersion: payload.dbVersion,
|
||||
};
|
||||
if (old.notification) setPayload.notification = '';
|
||||
if (old && lt(payload.version, old.version)) {
|
||||
await coll.updateOne(
|
||||
{ _id: installId },
|
||||
@@ -85,6 +86,7 @@ class DataReportHandler extends Handler {
|
||||
this.ctx.emit('center/report', this, installId, old, payload);
|
||||
// TODO deliver messages
|
||||
this.response.body = { code: 0 };
|
||||
if (old.notification) this.response.body.notification = old.notification;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@hydrooj/center",
|
||||
"version": "0.2.7",
|
||||
"version": "0.2.8",
|
||||
"main": "index.ts",
|
||||
"repository": "https://github.com/hydro-dev/Hydro.git",
|
||||
"author": "undefined <i@undefined.moe>",
|
||||
|
||||
Reference in new issue
Block a user