24 lines
763 B
JavaScript
24 lines
763 B
JavaScript
let router = require('express')();
|
|
let path = require('path');
|
|
let view = require('./view.js');
|
|
|
|
router.get('/', function(request, response) {
|
|
view.render('home', {id: request.user.id}, response);
|
|
});
|
|
|
|
router.get('/history', function(request, response) {
|
|
let number = request.query.number;
|
|
view.render('history', {id: request.user.id, call: number}, response);
|
|
});
|
|
|
|
router.get('/dialpad', function(request, response) {
|
|
let number = request.query.number;
|
|
view.render('dialpad', {id: request.user.id, call: number}, response);
|
|
});
|
|
|
|
router.get('/call', function(request, response) {
|
|
let number = request.query.number;
|
|
view.render('call', {id: request.user.id, call: number}, response);
|
|
});
|
|
|
|
module.exports = router; |