fix item update endpoint
This commit is contained in:
parent
2e5377cca7
commit
dcc9e87dad
1 changed files with 3 additions and 4 deletions
|
@ -52,10 +52,9 @@ class ItemController extends Controller
|
||||||
|
|
||||||
public function update($event, $id, Request $request)
|
public function update($event, $id, Request $request)
|
||||||
{
|
{
|
||||||
$eid = Event::where('slug','=',$event)->first()->eid;
|
$eid = Event::where('slug', $event)->first()->eid;
|
||||||
$item = Item::findOrFail($id);
|
$item = Item::where('eid', $eid)->where('item_uid', $id)->first();
|
||||||
$item->update($request->all());
|
$item->update($request->except(['file','box']));
|
||||||
|
|
||||||
return response()->json($item, 200);
|
return response()->json($item, 200);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue