Skip to content

Commit c64e400

Browse files
committed
fix(news): 修复投稿时输入错误密码依然能够投稿成功!
fixed zhiyicx/thinksns-plus-android#2396 zhiyicx/thinksns-plus-android#2390
1 parent 61a97cd commit c64e400

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -406,10 +406,12 @@ public function newStore(
406406

407407
if ($config['pay'] && $user->currency && $user->currency->sum < $payAmount) {
408408
return $response->json(['message' => '账户余额不足'], 403);
409-
}
410-
411-
if ($config['verified'] && $user->verified === null) {
409+
} elseif ($config['verified'] && $user->verified === null) {
412410
return $response->json(['message' => '未认证用户不可投稿'], 403);
411+
} elseif ($config['pay']) {
412+
app(VerifyUserPassword::class)->handle($request, function () {
413+
// No code.
414+
});
413415
}
414416

415417
$map = $request->only(['title', 'content', 'subject']);

0 commit comments

Comments
 (0)