mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
1.0.0-preview
This commit is contained in:
1 parent
90b06d6aa7
commit
8cd84f29e8
18 files changed
+152
-401
No files matched your search
@@ -160,7 +160,13 @@ async function setTestdata(_id, readStream) {
|
||||
return await edit(_id, { data: f.id }); // eslint-disable-line no-return-await
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
async function getData(pid) {
|
||||
const pdoc = await get(pid);
|
||||
if (!pdoc.data) return null;
|
||||
return gridfs.openDownloadStream(pdoc.data);
|
||||
}
|
||||
|
||||
global.Hydro.model.problem = module.exports = {
|
||||
add,
|
||||
inc,
|
||||
get,
|
||||
@@ -175,4 +181,5 @@ module.exports = {
|
||||
getMultiStatus,
|
||||
setTestdata,
|
||||
updateStatus,
|
||||
getData,
|
||||
};
|
||||
Reference in new issue
Block a user