Mike 8 年 前
コミット
e475117c75

+ 5 - 5
server/app/Http/Controllers/Api/V1/InteractionController.php

xqd xqd xqd
@@ -14,8 +14,8 @@ class InteractionController extends Controller
      * @apiGroup Interaction
      * @apiPermission Passport
      * @apiVersion 0.1.0
-     * @apiParam {int} dream_id           梦想ID
-     * @apiParam {string} title           动标题
+     * @apiParam {int} id                 梦想ID
+     * @apiParam {string} title           动标题
      * @apiParam {array} pics[]           图片数组
      * @apiSuccessExample {json} Success-Response:
      * HTTP/1.1 200 OK
@@ -39,11 +39,11 @@ class InteractionController extends Controller
     {
         $validator = \Validator::make($request->all(),
             [
-                'dream_id'  => 'required',
+                'id'  => 'required',
                 'title'  => 'required',
             ],
             [
-                'dream_id.required'  => '梦想ID不能为空',
+                'id.required'  => '梦想ID不能为空',
                 'title.required'  => '动态标题不能为空',
             ]
         );
@@ -57,7 +57,7 @@ class InteractionController extends Controller
         foreach ($pics as $k => $pic) {
             $data['pic'.($k+1)] = $pic;
         }
-        $dream_id = $request->dream_id;
+        $dream_id = $request->id;
         $title = $request->title;
         $data['dream_id'] = $dream_id;
         $data['title'] = $title;