diff options
Diffstat (limited to 'src/server')
-rw-r--r-- | src/server/routes/getSchedule.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/server/routes/getSchedule.js b/src/server/routes/getSchedule.js index cb7ad67..7850918 100644 --- a/src/server/routes/getSchedule.js +++ b/src/server/routes/getSchedule.js @@ -32,6 +32,16 @@ router.get('/:type/:value.png', function (req, res, next) { stream.pipe(res) }) +router.get('/:type/:value.jpg', function (req, res, next) { + port = process.env.PORT || 3000; + const { type, value } = req.params + const stream = webshot( + `http://localhost:${port}/get/${type}/${value}`, + { customCSS: "body { background-color: white; }", streamType: 'jpg' } + ) + stream.pipe(res) +}) + router.get('/:type/:value', function (req, res, next) { getUserIndex().then(users => { const { type, value } = req.params |