refactor(private-messages): cleanup block-user
This commit is contained in:
@@ -45,13 +45,4 @@ api.sendPrivateMessage = function(req,res,next){
|
||||
res.send(200);
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
api.block = function(req,res,next){
|
||||
var b = res.locals.user.inbox;
|
||||
if (~b.blocks.indexOf(req.params.id)){
|
||||
b.blocks.push(req.params.id)
|
||||
res.locals.user.save();
|
||||
}
|
||||
res.send(200);
|
||||
}
|
||||
}
|
||||
@@ -601,7 +601,7 @@ module.exports = (swagger, v2) ->
|
||||
path 'uuid', 'The UUID of the member to message', 'string'
|
||||
]
|
||||
middleware: [auth.auth]
|
||||
action: members.block
|
||||
action: user.blockUser
|
||||
|
||||
# ---------------------------------
|
||||
# Hall of Heroes / Patrons
|
||||
|
||||
Reference in New Issue
Block a user