dyjh 6 tahun lalu
induk
melakukan
12b6bfc929
1 mengubah file dengan 2 tambahan dan 2 penghapusan
  1. 2 2
      app/Http/Controllers/Api/V1/AlbumController.php

+ 2 - 2
app/Http/Controllers/Api/V1/AlbumController.php

xqd xqd
@@ -283,7 +283,7 @@ class AlbumController extends Controller
         if (Auth::loginUsingId($check->id)) {
             $userAuth = Auth::user();
             if($check->is_dealer ==0){
-                $save['up_agent_id'] = $request->input('agent_id');dd($request->input('agent_id'));
+                $userAuth->up_agent_id = $request->input('agent_id');
                 $add_record['agent_id'] = $request->input('agent_id');
                 $add_record['open_id'] = $check->wechat_open_id;
                 $add_record['action'] = 4;
@@ -291,7 +291,7 @@ class AlbumController extends Controller
                 $add_record['detail'] = null;
                 AlbumWatchRecord::create($add_record);
             }else{
-                $save['up_agent_id'] = 0;
+                $userAuth->up_agent_id = 0;
             }
             $userAuth->save();
             $token = $userAuth->createToken($userAuth->id . '-' . $userAuth->openid)->accessToken;