Skip to content

Commit

Permalink
api: elapsed time on X-elapsed header
Browse files Browse the repository at this point in the history
  • Loading branch information
wmertens committed Feb 10, 2021
1 parent 170d79d commit b92728b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/git-api.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ exports.registerApi = (env) => {
promise
.then((o) => {
const elapsed = Date.now() - now;
if (o && typeof o === 'object') o._elapsed = elapsed;
res.header('X-elapsed', elapsed);
return res.json(o == null ? {} : o);
})
.catch((err) => {
Expand Down

0 comments on commit b92728b

Please sign in to comment.