|
@@ -81,11 +81,11 @@ class PostRepositories
|
|
|
if($userInfo['strength']){
|
|
|
$isValid = 1;
|
|
|
}
|
|
|
-// $oneHourTime = Carbon::now()->addHours(-1)->toDateTimeString();
|
|
|
-// $oneHourPostCount = $this->post->where('uid', $userInfo['uid'])->where('created_at', '>', $oneHourTime)->count();
|
|
|
-// if($oneHourPostCount > 5){
|
|
|
-// return jsonError('创作欲望太强啦,休息一下,看看其他用户的内容吧!');
|
|
|
-// }
|
|
|
+ $oneHourTime = Carbon::now()->addHours(-1)->toDateTimeString();
|
|
|
+ $oneHourPostCount = $this->post->where('uid', $userInfo['uid'])->where('created_at', '>', $oneHourTime)->count();
|
|
|
+ if($oneHourPostCount > 5){
|
|
|
+ return jsonError('创作欲望太强啦,休息一下,看看其他用户的内容吧!');
|
|
|
+ }
|
|
|
|
|
|
$detectionText = $request['title'] .','. $request['content'];
|
|
|
$detectionTextResult = $this->detectionService->checkText($detectionText);
|