aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--server/controllers/api/pods.ts2
-rw-r--r--server/lib/friends.ts9
2 files changed, 4 insertions, 7 deletions
diff --git a/server/controllers/api/pods.ts b/server/controllers/api/pods.ts
index ec94efc35..804aa0659 100644
--- a/server/controllers/api/pods.ts
+++ b/server/controllers/api/pods.ts
@@ -83,6 +83,6 @@ function removeFriendController (req: express.Request, res: express.Response, ne
83 const pod = res.locals.pod as PodInstance 83 const pod = res.locals.pod as PodInstance
84 84
85 removeFriend(pod) 85 removeFriend(pod)
86 .then(() => (res.type('json').status(204).end())) 86 .then(() => res.type('json').status(204).end())
87 .catch(err => next(err)) 87 .catch(err => next(err))
88} 88}
diff --git a/server/lib/friends.ts b/server/lib/friends.ts
index 4cc4a82bf..65349ef5f 100644
--- a/server/lib/friends.ts
+++ b/server/lib/friends.ts
@@ -251,13 +251,10 @@ function removeFriend (pod: PodInstance) {
251 } 251 }
252 252
253 return makeSecureRequest(requestParams) 253 return makeSecureRequest(requestParams)
254 .catch(err => logger.warn('Cannot notify friends %s we are quitting him.', pod.host, err))
254 .then(() => pod.destroy()) 255 .then(() => pod.destroy())
255 .then(() => { 256 .then(() => logger.info('Removed friend %s.', pod.host))
256 logger.info('Removed friend.') 257 .catch(err => logger.error('Cannot destroy friend %s.', pod.host, err))
257 })
258 .catch(err => {
259 logger.error('Some errors while quitting friend %s (id: %d).', pod.host, pod.id, err)
260 })
261} 258}
262 259
263function getRequestScheduler () { 260function getRequestScheduler () {