1
0
mirror of https://gitlab.com/timvisee/send.git synced 2024-09-23 01:21:32 +02:00
send/app/routes/download.js
2017-10-10 10:45:10 -07:00

13 lines
333 B
JavaScript

const preview = require('../templates/preview');
const download = require('../templates/download');
module.exports = function(state, emit) {
if (state.transfer) {
const s = state.transfer.state;
if (s === 'downloading' || s === 'complete') {
return download(state, emit);
}
}
return preview(state, emit);
};