finish event with log user participation
This commit is contained in:
@@ -130,4 +130,24 @@ class EventController extends Controller
|
||||
->response()
|
||||
->setStatusCode(200);
|
||||
}
|
||||
|
||||
public function userConfirmParticipation(Event $event)
|
||||
{
|
||||
$this->authorize('participation', $event);
|
||||
|
||||
$event->guests()->updateExistingPivot(auth()->user(), ['validated_at' => now()->toDateTimeString()], false);
|
||||
|
||||
return (new EventResource($event))
|
||||
->response()
|
||||
->setStatusCode(200);
|
||||
}
|
||||
|
||||
public function userDeleteInvitation(Event $event)
|
||||
{
|
||||
$this->authorize('participation', $event);
|
||||
|
||||
$event->guests()->detach(auth()->user());
|
||||
|
||||
return response([], 204);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user