题目搜索,收藏功能

This commit is contained in:
undefined committed 2020-06-24 13:39:32 +08:00
1 parent a248425db6
commit 441eeadaf3
23 files changed
+158 -97

No files matched your search

+10 -2
View File
@@ -123,8 +123,11 @@ function getStatus(domainId, did, uid) {
return document.getStatus(domainId, document.TYPE_DISCUSSION, did, uid);
}
function addNode(domainId, _id, category) {
return document.add(domainId, category, 1, document.TYPE_DISCUSSION_NODE, _id);
function addNode(domainId, _id, category, args) {
return document.add(
domainId, category, 1, document.TYPE_DISCUSSION_NODE,
_id, null, null, args,
);
}
function getNode(domainId, _id) {
@@ -166,6 +169,10 @@ async function getVnode(domainId, ddoc, handler) {
};
}
function getNodes(domainId) {
return document.getMulti(domainId, document.TYPE_DISCUSSION_NODE).toArray();
}
async function getListVnodes(domainId, ddocs, handler) {
const tasks = [];
const res = {};
@@ -201,6 +208,7 @@ global.Hydro.model.discussion = module.exports = {
setStar,
getStatus,
addNode,
getNodes,
getVnode,
getListVnodes,
};