feat:兼容开发
parent
92ee37b381
commit
34523c1c5f
|
@ -23,7 +23,6 @@ use Psr\Http\Message\ResponseInterface;
|
||||||
*/
|
*/
|
||||||
class ArticleController extends CController
|
class ArticleController extends CController
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var ArticleService
|
* @var ArticleService
|
||||||
*/
|
*/
|
||||||
|
@ -35,8 +34,7 @@ class ArticleController extends CController
|
||||||
|
|
||||||
$this->articleService = $service;
|
$this->articleService = $service;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取笔记列表
|
* 获取笔记列表
|
||||||
*
|
*
|
||||||
|
|
|
@ -59,6 +59,7 @@ class MessageController extends CController
|
||||||
public function text(): ResponseInterface
|
public function text(): ResponseInterface
|
||||||
{
|
{
|
||||||
$params = $this->request->inputs(['talk_type', 'receiver_id', 'text']);
|
$params = $this->request->inputs(['talk_type', 'receiver_id', 'text']);
|
||||||
|
|
||||||
$this->validate($params, [
|
$this->validate($params, [
|
||||||
'talk_type' => 'required|in:1,2',
|
'talk_type' => 'required|in:1,2',
|
||||||
'receiver_id' => 'required|integer|min:1',
|
'receiver_id' => 'required|integer|min:1',
|
||||||
|
@ -233,6 +234,7 @@ class MessageController extends CController
|
||||||
public function vote(): ResponseInterface
|
public function vote(): ResponseInterface
|
||||||
{
|
{
|
||||||
$params = $this->request->all();
|
$params = $this->request->all();
|
||||||
|
|
||||||
$this->validate($params, [
|
$this->validate($params, [
|
||||||
'receiver_id' => 'required|integer|min:1',
|
'receiver_id' => 'required|integer|min:1',
|
||||||
'mode' => 'required|integer|in:0,1',
|
'mode' => 'required|integer|in:0,1',
|
||||||
|
@ -389,6 +391,7 @@ class MessageController extends CController
|
||||||
public function collect(EmoticonService $service): ResponseInterface
|
public function collect(EmoticonService $service): ResponseInterface
|
||||||
{
|
{
|
||||||
$params = $this->request->inputs(['record_id']);
|
$params = $this->request->inputs(['record_id']);
|
||||||
|
|
||||||
$this->validate($params, [
|
$this->validate($params, [
|
||||||
'record_id' => 'required|integer'
|
'record_id' => 'required|integer'
|
||||||
]);
|
]);
|
||||||
|
@ -410,6 +413,7 @@ class MessageController extends CController
|
||||||
public function revoke(): ResponseInterface
|
public function revoke(): ResponseInterface
|
||||||
{
|
{
|
||||||
$params = $this->request->inputs(['record_id']);
|
$params = $this->request->inputs(['record_id']);
|
||||||
|
|
||||||
$this->validate($params, [
|
$this->validate($params, [
|
||||||
'record_id' => 'required|integer|min:1'
|
'record_id' => 'required|integer|min:1'
|
||||||
]);
|
]);
|
||||||
|
@ -428,6 +432,7 @@ class MessageController extends CController
|
||||||
public function delete(): ResponseInterface
|
public function delete(): ResponseInterface
|
||||||
{
|
{
|
||||||
$params = $this->request->inputs(['talk_type', 'receiver_id', 'record_id']);
|
$params = $this->request->inputs(['talk_type', 'receiver_id', 'record_id']);
|
||||||
|
|
||||||
$this->validate($params, [
|
$this->validate($params, [
|
||||||
'talk_type' => 'required|in:1,2',
|
'talk_type' => 'required|in:1,2',
|
||||||
'receiver_id' => 'required|integer|min:1',
|
'receiver_id' => 'required|integer|min:1',
|
||||||
|
|
Loading…
Reference in New Issue