Advertisement
Guest User

Untitled

a guest
Jul 21st, 2017
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. module.exports = (delay = 5000, prop = { success: true }, status = 200) => {
  2. return async (ctx, next) => {
  3. ctx.type = 'application/json'
  4. ctx.status = status
  5. ctx.body = payload
  6.  
  7. setTimeout(function () {
  8. next()
  9. }, delay)
  10. }
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement