|
@@ -163,13 +163,13 @@ class CommonController extends Controller
|
163
|
163
|
* @param Request $request
|
164
|
164
|
* @return \Illuminate\Http\JsonResponse
|
165
|
165
|
*/
|
166
|
|
- public function status(Request $request, $type)
|
|
166
|
+ public function status(Request $request, $order_type)
|
167
|
167
|
{
|
168
|
168
|
$id = $request->input("id");
|
169
|
169
|
$status = $request->input("status");
|
170
|
|
- $type = $request->route("type");
|
171
|
|
- if ($id) {
|
172
|
|
- $record = $this->getRecord($type, $id);
|
|
170
|
+ $order_type = $request->route("order_type");
|
|
171
|
+ if ($id && $order_type) {
|
|
172
|
+ $record = $this->getRecord($order_type, $id);
|
173
|
173
|
if ($record) {
|
174
|
174
|
$record->status = $status;
|
175
|
175
|
$record->save();
|
|
@@ -231,12 +231,12 @@ class CommonController extends Controller
|
231
|
231
|
* @param $id
|
232
|
232
|
* @return \Illuminate\Http\JsonResponse
|
233
|
233
|
*/
|
234
|
|
- public function get(Request $request, $type, $id)
|
|
234
|
+ public function get(Request $request, $order_type, $id)
|
235
|
235
|
{
|
236
|
236
|
$id = $request->route("id");
|
237
|
|
- $type = $request->route("type");
|
238
|
|
- if ($id && $type) {
|
239
|
|
- $record = getRecord($type, $id);
|
|
237
|
+ $order_type = $request->route("order_type");
|
|
238
|
+ if ($id && $order_type) {
|
|
239
|
+ $record = $this->getRecord($order_type, $id);
|
240
|
240
|
if ($record) {
|
241
|
241
|
return Response()->json([
|
242
|
242
|
"status" => 0,
|