Skip to content

Commit

Permalink
refactor: define format
Browse files Browse the repository at this point in the history
  • Loading branch information
Kikobeats committed Jan 16, 2024
1 parent 0a04b24 commit 6d28475
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
'use strict'

const timeSpan = require('@kikobeats/time-span')()
const debug = require('debug-logfmt')('unavatar')
const serveStatic = require('serve-static')
const createRouter = require('router-http')
Expand All @@ -10,6 +9,10 @@ const { forEach } = require('lodash')
const send = require('send-http')
const path = require('path')

const timeSpan = require('@kikobeats/time-span')({
format: n => format(Math.round(n))
})

const { providers } = require('./providers')
const ssrCache = require('./send/cache')
const avatar = require('./avatar')
Expand Down Expand Up @@ -70,7 +73,7 @@ router
debug(
`${req.ipAddress} ${new URL(req.url, API_URL).toString()} ${
res.statusCode
} ${format(Math.round(req.timestamp()))}`
} ${req.timestamp()}`
)
})
next()
Expand Down

0 comments on commit 6d28475

Please sign in to comment.