             res.send 400
 
     deleteFriend : (req, res, next) =>
-        console.log "delete friend"
+        param = req.body
+        if param? and param.name? and req.params.id?
+            Db.get 'user', req.params.id, (user) =>
+                if user?
+                    if user.friends?
+                        i = 0
+                        list = []
+                        if user.friends.length isnt 0
+                            for friend of user.friends
+                                if friend.name isnt user.name and user.friends.length isnt 1
+                                    list.push friend
+                                i++
+                        Db.update 'user', req.params.id, {friends:list}, () =>
+                            res.send 200
+                    else
+                        res.send 400
+                else
+                    res.send 400
+        else
+            res.send 400
 
 exports.User    = new _User
 exports.Routes  =

        '/user/mail/:id'        : exports.User.updateUserMail
        '/user/password/:id'    : exports.User.updateUserPassword

    delete :
        '/user/friend'  : exports.User.deleteFriend
                                user.friends.push {_id : docs[0]._id, name : param.name}
                                Db.update 'user', user._id, user, () =>
                                    res.send 200 # Change to render a proper page TODO
                            else
                                res.send 400
                    else
                        res.send 400 # Change to render a proper page TODO
        else
