Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- module.exports = (delay = 5000, prop = { success: true }, status = 200) => {
- return async (ctx, next) => {
- ctx.type = 'application/json'
- ctx.status = status
- ctx.body = payload
- setTimeout(function () {
- next()
- }, delay)
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement