Skip to content

Commit

Permalink
chore: use _req
Browse files Browse the repository at this point in the history
  • Loading branch information
Cluas committed Aug 27, 2024
1 parent 814a2b0 commit 1683efa
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pyroscope/pyroscope.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,12 +128,12 @@ const selectMergeProfile = async (req, res) => {
try {
const _req = req.body
const fromTimeSec =
Math.floor(req.body && req.body.getStart
? parseInt(req.body.getStart()) / 1000
Math.floor(_req && _req.getStart
? parseInt(_req.getStart()) / 1000
: (Date.now() - HISTORY_TIMESPAN) / 1000)
const toTimeSec =
Math.floor(req.body && req.body.getEnd
? parseInt(req.body.getEnd()) / 1000
Math.floor(_req && _req.getEnd
? parseInt(_req.getEnd()) / 1000
: Date.now() / 1000)
let typeID = _req.getProfileTypeid && _req.getProfileTypeid()
if (!typeID) {
Expand Down

0 comments on commit 1683efa

Please sign in to comment.