Example #1
0
 public function actionEditDiscussion()
 {
     if (Yii::$app->user->isGuest) {
         echo json_encode(['status' => 'error']);
         die;
     }
     $request = Yii::$app->request;
     $disId = $request->post('disId');
     $text = $request->post('text');
     if (Club::checkPermissionDiscussion($disId)) {
         Club::editDiscussion($disId, $text);
         echo json_encode(['status' => 'success']);
         die;
     }
     echo json_encode(['status' => 'error']);
     die;
 }