mirror of
https://github.com/HackPlan/RootPanel.git
synced 2026-04-29 03:55:42 +08:00
处理 404 和 403 的情况
This commit is contained in:
@@ -36,6 +36,12 @@ module.exports =
|
||||
return res.redirect '/account/login/'
|
||||
|
||||
mTicket.findId req.body.id, (ticket) ->
|
||||
unless ticket
|
||||
return res.send 404
|
||||
|
||||
unless mTicket.hasMember ticket, account
|
||||
return res.send 403
|
||||
|
||||
res.render 'ticket/view',
|
||||
account: account
|
||||
ticket: ticket
|
||||
|
||||
Reference in New Issue
Block a user