From 6c5c12c633e88d3bdbe161a50a8dd02c98dfb983 Mon Sep 17 00:00:00 2001 From: gzydong <837215079@qq.com> Date: Sat, 9 Oct 2021 10:54:00 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E4=BF=AE=E5=A4=8D=E8=87=AA=E5=AE=9A?= =?UTF-8?q?=E4=B9=89=E4=B8=8A=E4=BC=A0=E6=96=87=E4=BB=B6=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E6=89=BE=E4=B8=8D=E5=88=B0=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Controller/Api/V1/EmoticonController.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/Controller/Api/V1/EmoticonController.php b/app/Controller/Api/V1/EmoticonController.php index c49fa06..7e63b70 100644 --- a/app/Controller/Api/V1/EmoticonController.php +++ b/app/Controller/Api/V1/EmoticonController.php @@ -132,7 +132,7 @@ class EmoticonController extends CController /** * 自定义上传表情包 * - * @RequestMapping(path="upload", methods="post") + * @RequestMapping(path="upload-emoticon", methods="post") * @param Filesystem $filesystem * @return ResponseInterface */ @@ -142,6 +142,7 @@ class EmoticonController extends CController if (!$file->isValid()) { return $this->response->fail( '图片上传失败,请稍后再试!', + [], ResponseCode::VALIDATION_ERROR ); } @@ -150,6 +151,7 @@ class EmoticonController extends CController if (!in_array($ext, ['jpg', 'png', 'jpeg', 'gif', 'webp'])) { return $this->response->fail( '图片格式错误,目前仅支持jpg、png、jpeg、gif和webp', + [], ResponseCode::VALIDATION_ERROR ); }