浏览代码

Update config var

Daniel Supernault 6 年之前
父节点
当前提交
9879d3c942
共有 2 个文件被更改,包括 3 次插入5 次删除
  1. 1 1
      app/Http/Controllers/ApiController.php
  2. 2 4
      app/Http/Controllers/FederationController.php

+ 1 - 1
app/Http/Controllers/ApiController.php

@@ -40,7 +40,7 @@ class ApiController extends BaseApiController
 
                 'activitypub' => [
                     'enabled' => config('federation.activitypub.enabled'),
-                    'remote_follow' => config('pixelfed.remote_follow_enabled')
+                    'remote_follow' => config('federation.activitypub.remoteFollow')
                 ],
 
                 'ab' => [

+ 2 - 4
app/Http/Controllers/FederationController.php

@@ -51,15 +51,13 @@ class FederationController extends Controller
     public function remoteFollowStore(Request $request)
     {
         return;
-        
+
         $this->authCheck();
         $this->validate($request, [
             'url' => 'required|string',
         ]);
 
-        if (config('pixelfed.remote_follow_enabled') !== true) {
-            abort(403);
-        }
+        abort_if(!config('federation.activitypub.remoteFollow'), 403);
 
         $follower = Auth::user()->profile;
         $url = $request->input('url');