mirror of
https://github.com/YMFE/yapi.git
synced 2024-12-27 05:30:14 +08:00
Merge branch 'dev-1.1'
This commit is contained in:
commit
72e7b97d68
@ -218,8 +218,10 @@ class interfaceController extends baseController {
|
||||
yapi.emitHook('interface_get', params.id).then();
|
||||
|
||||
result = result.toObject();
|
||||
result.username = userinfo.username;
|
||||
|
||||
if(userinfo){
|
||||
result.username = userinfo.username;
|
||||
}
|
||||
|
||||
ctx.body = yapi.commons.resReturn(result);
|
||||
} catch (e) {
|
||||
ctx.body = yapi.commons.resReturn(null, 402, e.message);
|
||||
@ -262,7 +264,7 @@ class interfaceController extends baseController {
|
||||
|
||||
async downloadCrx(ctx){
|
||||
let filename = 'crossRequest.zip';
|
||||
let dataBuffer = yapi.fs.readFileSync(yapi.path.join(yapi.WEBROOT, 'static/attachment/cross-request-v2.0.1.zip'));
|
||||
let dataBuffer = yapi.fs.readFileSync(yapi.path.join(yapi.WEBROOT, 'static/attachment/cross-request-v2.1.zip'));
|
||||
ctx.set('Content-disposition', 'attachment; filename=' + filename);
|
||||
ctx.set('Content-Type', 'application/zip');
|
||||
ctx.body = dataBuffer;
|
||||
|
BIN
static/attachment/cross-request-v2.1.zip
Normal file
BIN
static/attachment/cross-request-v2.1.zip
Normal file
Binary file not shown.
@ -1 +1 @@
|
||||
window.WEBPACK_ASSETS = {"index.js":{"js":"index@19f2e7d598785ca4b7bd.js","css":"index@19f2e7d598785ca4b7bd.css"},"lib":{"js":"lib@cd09b17af3008fec401c.js"},"lib2":{"js":"lib2@fda61e2b7f61e65a452d.js"},"manifest":{"js":"manifest@b67af9f8b578904e66c5.js"}}
|
||||
window.WEBPACK_ASSETS = {"index.js":{"js":"index@b7319d87e565b15549b5.js","css":"index@b7319d87e565b15549b5.css"},"lib":{"js":"lib@cd09b17af3008fec401c.js"},"lib2":{"js":"lib2@fda61e2b7f61e65a452d.js"},"manifest":{"js":"manifest@b67af9f8b578904e66c5.js"}}
|
File diff suppressed because one or more lines are too long
Binary file not shown.
Loading…
Reference in New Issue
Block a user