|
@@ -100,8 +100,8 @@ class PostRepositories
|
|
|
|
|
|
$topicIds = json_decode($request['topic_ids'], true);
|
|
$topicIds = json_decode($request['topic_ids'], true);
|
|
$topicCount = count($topicIds);
|
|
$topicCount = count($topicIds);
|
|
- if ($topicCount == 0 || $topicCount > 5) {
|
|
|
|
- return jsonError('所选话题必须1-5个');
|
|
|
|
|
|
+ if ($topicCount == 0 || $topicCount > 2) {
|
|
|
|
+ return jsonError('所选话题必须1-2个');
|
|
}
|
|
}
|
|
//验证话题
|
|
//验证话题
|
|
$hasTopicCount = $this->topic->whereIn('id', $topicIds)->count();
|
|
$hasTopicCount = $this->topic->whereIn('id', $topicIds)->count();
|