0cf9602958
Events can be moved to archive and moved back Fixed validation
23 lines
508 B
PHP
23 lines
508 B
PHP
<?php
|
|
|
|
namespace App\Domains\Event\Actions\UnarchiveEvent;
|
|
|
|
class UnarchiveEventCommand {
|
|
public UnarchiveEventRequest $request;
|
|
|
|
public function __construct(UnarchiveEventRequest $request) {
|
|
$this->request = $request;
|
|
}
|
|
|
|
public function execute(): UnarchiveEventResponse {
|
|
$response = new UnarchiveEventResponse();
|
|
|
|
$this->request->event->archived = false;
|
|
$this->request->event->save();
|
|
|
|
$response->success = true;
|
|
|
|
return $response;
|
|
}
|
|
}
|