UNPKG

379 Btext/coffeescriptView Raw
1'use strict'
2
3module.exports = (options) ->
4 database = options.database
5 (req, res, next) ->
6 if database.maintenance()
7 if req.originalUrl is '/maintenance-off' or req.originalUrl is '/api/upload/database' or req.originalUrl is '/api/getdb'
8 next()
9 else
10 res.end 'Database maintenance time, please come back later'
11 else
12 next()
\No newline at end of file