mirror of
https://github.com/brunofontes/shareit.git
synced 2025-11-15 07:50:54 -03:00
Bug Fixed: avoiding item waiting_user across take/return
It happend once: a user asked to be added to the waiting list at the same time other user was returning the item. So the user ended up waiting for the user he was already using.
This commit is contained in:
@@ -30,6 +30,7 @@ class TakeController extends Controller
|
||||
);
|
||||
}
|
||||
$item->used_by = Auth::id();
|
||||
$item->waiting_user_id = null;
|
||||
$item->save();
|
||||
return redirect('home');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user