mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
remove domain system
This commit is contained in:
1 parent
7fa4a58abe
commit
fc26af30ef
31 files changed
+709
-1242
No files matched your search
@@ -36,10 +36,10 @@ async function get(rid) {
|
||||
async function getMany(query, sort, page, limit) {
|
||||
return await coll.find(query).sort(sort).skip((page - 1) * limit).limit(limit).toArray();
|
||||
}
|
||||
async function update(domainId, rid, $set) {
|
||||
await coll.findOneAndUpdate({ domainId, _id: rid }, { $set });
|
||||
let rdoc = await coll.findOne({ domainId, _id: rid });
|
||||
if (!rdoc) throw new RecordNotFoundError(domainId, rid);
|
||||
async function update(rid, $set) {
|
||||
await coll.findOneAndUpdate({ _id: rid }, { $set });
|
||||
let rdoc = await coll.findOne({ _id: rid });
|
||||
if (!rdoc) throw new RecordNotFoundError(rid);
|
||||
return rdoc;
|
||||
}
|
||||
async function count(query) {
|
||||
|
||||
Reference in new issue
Block a user