Skip to content

Commit 8b89b39

Browse files
committed
feat(news): 增加资讯和资讯评论申请置顶验证用户密码
zhiyicx/thinksns-plus-android#2390
1 parent 885dbf1 commit 8b89b39

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

packages/slimkit-plus-news/src/API2/Controllers/NewPinnedController.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,24 @@
2424
use Illuminate\Http\Request;
2525
use Zhiyi\Plus\Http\Controllers\Controller;
2626
use Zhiyi\Plus\Models\Comment as CommentModel;
27+
use Zhiyi\Plus\Http\Middleware\VerifyUserPassword;
2728
use Zhiyi\Plus\Models\UserCount as UserCountModel;
2829
use Zhiyi\Plus\Packages\Currency\Processes\User as UserProcess;
2930
use Zhiyi\Component\ZhiyiPlus\PlusComponentNews\Models\News as NewsModel;
3031
use Zhiyi\Component\ZhiyiPlus\PlusComponentNews\Models\NewsPinned as NewsPinnedModel;
3132

3233
class NewPinnedController extends Controller
3334
{
35+
/**
36+
* Create the controller instance.
37+
*/
38+
public function __construct()
39+
{
40+
$this
41+
->middleware(VerifyUserPassword::class)
42+
->only(['newsPinned', 'commentPinned']);
43+
}
44+
3445
/**
3546
* 申请资讯置顶.
3647
*

packages/slimkit-plus-news/src/API2/Controllers/NewRewardController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public function __construct()
3636
{
3737
$this
3838
->middleware(VerifyUserPassword::class)
39-
->only(['pay', 'payByCurrency']);
39+
->only(['reward']);
4040
}
4141

4242
/**

0 commit comments

Comments
 (0)