From 1d26f4b24f92310faa98753c0d82a7ae737adb87 Mon Sep 17 00:00:00 2001 From: Derek Tamsen Date: Wed, 13 Dec 2017 18:22:17 -0800 Subject: [PATCH] Use EXPIRE_SECONDS to calculate file ttl for static content --- app/templates/share.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/templates/share.js b/app/templates/share.js index e86d18e0..abf5d018 100644 --- a/app/templates/share.js +++ b/app/templates/share.js @@ -1,3 +1,4 @@ +/* global EXPIRE_SECONDS */ const html = require('choo/html'); const assets = require('../../common/assets'); const notFound = require('./notFound'); @@ -16,10 +17,11 @@ function passwordComplete(state, password) { } function expireInfo(file, translate, emit) { + const hours = Math.floor(EXPIRE_SECONDS / 60 / 60); const el = html([ `
${translate('expireInfo', { downloadCount: '', - timespan: translate('timespanHours', { num: 24 }) + timespan: translate('timespanHours', { num: hours }) })}
` ]); const select = el.querySelector('select');