dever 7 tahun lalu
induk
melakukan
af6b379a7d
1 mengubah file dengan 1 tambahan dan 1 penghapusan
  1. 1 1
      src/Api.php

+ 1 - 1
src/Api.php

@@ -21,11 +21,11 @@ class Api
 		if (!$user) {
 			$user['uid'] = $uid;
 			$user['index'] = 1;
-			$user['question_total'] = Dever::db('survey/info')->total(array('product_id' => $product_id));
 			$user['product_id'] = $product_id;
 			$user['status'] = 2;
 			$user['id'] = Dever::db('survey/user')->insert($user);
 		}
+		$user['question_total'] = Dever::db('survey/info')->total(array('product_id' => $product_id));
 
 		$result['user'] = $user;
 		if ($page_number > 0) {