소스 검색

Merge pull request #1699 from pixelfed/staging

Update FollowController, fix private account bug
daniel 5 년 전
부모
커밋
ac83d9e61f
2개의 변경된 파일9개의 추가작업 그리고 1개의 파일을 삭제
  1. 4 0
      CHANGELOG.md
  2. 5 1
      app/Http/Controllers/FollowerController.php

+ 4 - 0
CHANGELOG.md

@@ -6,10 +6,14 @@
 
 ### Fixed
 - Fixed count bug in StatusHashtagService [#1694](https://github.com/pixelfed/pixelfed/pull/1694)
+- Fixed private account bug [#1699](https://github.com/pixelfed/pixelfed/pull/1699)
 
 ### Changed
 - Updated EmailService, added new domains [#1690](https://github.com/pixelfed/pixelfed/pull/1690)
 - Updated quill.js to v1.3.7 [#1692](https://github.com/pixelfed/pixelfed/pull/1690)
+
+## Deprecated
+- Remove deprecated profile following/followers [#1697](https://github.com/pixelfed/pixelfed/pull/1697)
     
     
 ## [v0.10.3 (2019-09-08)](https://github.com/pixelfed/pixelfed/compare/v0.10.2...v0.10.3)

+ 5 - 1
app/Http/Controllers/FollowerController.php

@@ -27,7 +27,11 @@ class FollowerController extends Controller
         ]);
         $item = (int) $request->input('item');
         $this->handleFollowRequest($item);
-        return response()->json(200);
+        if($request->wantsJson()) {
+            return response()->json(200);
+        } else {
+            return redirect()->back();
+        }
     }
 
     protected function handleFollowRequest($item)