Skip to content

Commit

Permalink
Merge branch 'feature/admin-users-section' of https://github.com/open…
Browse files Browse the repository at this point in the history
…foodfoundation/vine into feature/admin-users-section
  • Loading branch information
ok200paul committed Aug 28, 2024
2 parents a1e09e5 + b11dd5e commit 8925505
Showing 1 changed file with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,11 @@ public function store(): JsonResponse
*/
$teamId = $this->request->get('team_id');
$userId = $this->request->get('user_id');
$model = TeamUser::where('team_id', $teamId)
->where('user_id', $userId)
->first();
$model = TeamUser::where('team_id', $teamId)
->where('user_id', $userId)
->first();

if(!$model)
{
if (!$model) {
$model = new TeamUser();

foreach ($validationArray as $key => $validationRule) {
Expand All @@ -107,7 +106,6 @@ public function store(): JsonResponse
$model->save();
}


$this->message = ApiResponse::RESPONSE_SAVED->value;
$this->data = $model;

Expand Down

0 comments on commit 8925505

Please sign in to comment.