mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
2.0.0(preview)
This commit is contained in:
1 parent
d5929d78b1
commit
1c8b62a6d9
33 files changed
+307
-241
No files matched your search
@@ -190,6 +190,13 @@ async function setStatus(domainId, docType, docId, uid, args) {
|
||||
return res.value;
|
||||
}
|
||||
|
||||
function setMultiStatus(domainId, docType, query, args) {
|
||||
return collStatus.updateMany(
|
||||
{ domainId, docType, ...query },
|
||||
{ $set: args },
|
||||
);
|
||||
}
|
||||
|
||||
async function setIfNotStatus(domainId, docType, docId, uid, key, value, ifNot, args) {
|
||||
const res = await collStatus.findOneAndUpdate(
|
||||
{
|
||||
@@ -351,6 +358,7 @@ global.Hydro.model.document = module.exports = {
|
||||
set,
|
||||
setIfNotStatus,
|
||||
setStatus,
|
||||
setMultiStatus,
|
||||
setSub,
|
||||
|
||||
TYPE_DOMAIN_USER,
|
||||
|
||||
Reference in new issue
Block a user