Refactor
This commit is contained in:
parent
ddc3c5ba68
commit
174f8022eb
131 changed files with 512 additions and 917 deletions
|
|
@ -42,18 +42,12 @@ export default (endpoint: string, user: IUser, app: IApp, data: any, file?: any)
|
|||
}
|
||||
}
|
||||
|
||||
let exec = ep.exec;
|
||||
|
||||
if (ep.meta.requireFile && file) {
|
||||
exec = exec.bind(null, file);
|
||||
}
|
||||
|
||||
let res;
|
||||
|
||||
// API invoking
|
||||
try {
|
||||
const before = performance.now();
|
||||
res = await exec(data, user, app);
|
||||
res = await ep.exec(data, user, app, file);
|
||||
const after = performance.now();
|
||||
|
||||
const time = after - before;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue