Commit b48eafcc authored by nano's avatar nano

fix

parent 5a182d17
......@@ -5,8 +5,6 @@
</component>
<component name="ChangeListManager">
<list default="true" id="f0cbce64-0ebc-4f60-8c2d-2fe9e214a8c0" name="Default" comment="">
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/serives/Queue.ts" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/routes/upload.ts" afterPath="$PROJECT_DIR$/src/routes/upload.ts" />
</list>
<ignored path="mycard-console-backend.iws" />
......@@ -67,8 +65,8 @@
<file leaf-file-name="upload.ts" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/src/routes/upload.ts">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="151">
<caret line="155" column="43" lean-forward="true" selection-start-line="155" selection-start-column="43" selection-end-line="155" selection-end-column="43" />
<state relative-caret-position="58">
<caret line="201" column="6" lean-forward="false" selection-start-line="201" selection-start-column="6" selection-end-line="201" selection-end-column="6" />
<folding>
<element signature="e#0#28#0" expanded="true" />
</folding>
......@@ -471,12 +469,12 @@
<workItem from="1493198225466" duration="47067000" />
<workItem from="1493371982129" duration="6000" />
<workItem from="1493372010655" duration="3472000" />
<workItem from="1493692283332" duration="14470000" />
<workItem from="1493692283332" duration="14736000" />
</task>
<servers />
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="216241000" />
<option name="totallyTimeSpent" value="216507000" />
</component>
<component name="TodoView">
<todo-panel id="selected-file">
......@@ -489,7 +487,6 @@
</component>
<component name="ToolWindowManager">
<frame x="55" y="23" width="1377" height="872" extended-state="0" />
<editor active="true" />
<layout>
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
<window_info id="DB Browser" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
......@@ -497,7 +494,7 @@
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" />
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.43941605" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32975295" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.31794873" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Terminal" active="true" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.31794873" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="TypeScript" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32820514" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.14011799" sideWeight="0.49384886" order="0" side_tool="false" content_ui="combo" />
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32846716" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
......@@ -906,8 +903,8 @@
</entry>
<entry file="file://$PROJECT_DIR$/src/routes/upload.ts">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="151">
<caret line="155" column="43" lean-forward="true" selection-start-line="155" selection-start-column="43" selection-end-line="155" selection-end-column="43" />
<state relative-caret-position="58">
<caret line="201" column="6" lean-forward="false" selection-start-line="201" selection-start-column="6" selection-end-line="201" selection-end-column="6" />
<folding>
<element signature="e#0#28#0" expanded="true" />
</folding>
......
......@@ -152,7 +152,6 @@ const uploadPackageUrl = async (ctx: Context) => {
ctx.throw(400, 'params error');
}
// testUrl: https://r.my-card.in/release/dist/0c16a3ecb115fd7cf575ccdd64f62a8f3edc635b087950e4ed4f3f781972bbfd.tar.gz
DownloadQueue.run(async (ctx, _next) => {
let pack = await mongodb.Packages.findOne({_id: toObjectID(ctx.request.body._id)});
if (!pack) {
......@@ -201,7 +200,7 @@ const uploadPackageUrl = async (ctx: Context) => {
console.log(err);
_next();
};
});
ctx.body = await new Promise((resolve, reject) => {
......@@ -215,7 +214,6 @@ const uploadPackageUrl = async (ctx: Context) => {
downloader.send('addUri', [ctx.request.body.url], {dir: config.upload_path});
});
});
};
router.post('/v1/upload/image', UploadImage);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment