mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 09:36:08 +08:00
center: use addToSet instead of push
This commit is contained in:
2 files changed
+3
-3
No files matched your search
@@ -67,7 +67,7 @@ class DataReportHandler extends Handler {
|
||||
await coll.updateOne(
|
||||
{ _id: installId },
|
||||
{
|
||||
$push: {
|
||||
$addToSet: {
|
||||
ips: this.request.ip,
|
||||
},
|
||||
$set: { downgrade: setPayload },
|
||||
@@ -75,7 +75,7 @@ class DataReportHandler extends Handler {
|
||||
);
|
||||
} else {
|
||||
await coll.updateOne({ _id: installId }, {
|
||||
$push: {
|
||||
$addToSet: {
|
||||
ips: this.request.ip,
|
||||
},
|
||||
$set: setPayload,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@hydrooj/center",
|
||||
"version": "0.2.5",
|
||||
"version": "0.2.6",
|
||||
"main": "index.ts",
|
||||
"repository": "https://github.com/hydro-dev/Hydro.git",
|
||||
"author": "undefined <i@undefined.moe>",
|
||||
|
||||
Reference in new issue
Block a user