]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/middlewares/validators/follows.ts
Speed up populate database script
[github/Chocobozzz/PeerTube.git] / server / middlewares / validators / follows.ts
index 7dadf6a19e49a0c4e716833f55cfcdbb67408ab3..bdf39eb9c543389b58139d87e8e5339e822b6c54 100644 (file)
@@ -16,7 +16,7 @@ const followValidator = [
     if (isTestInstance() === false && CONFIG.WEBSERVER.SCHEME === 'http') {
       return res.status(400)
         .json({
-          error: 'Cannot follow non HTTPS web server.'
+          error: 'Cannot follow on a non HTTPS web server.'
         })
         .end()
     }
@@ -41,7 +41,11 @@ const removeFollowingValidator = [
     const follow = await ActorFollowModel.loadByActorAndTargetHost(serverActor.id, req.params.host)
 
     if (!follow) {
-      return res.status(404)
+      return res
+        .status(404)
+        .json({
+          error: `Follower ${req.params.host} not found.`
+        })
         .end()
     }