<?php

namespace App\Generated\Controllers\V1;

use App\Generated\V1\Messages\Invite\LastInviteMessage;
use App\Http\Services\V1\InviteService;
use App\Http\Controllers\Controller;
use DB;

class InviteController extends Controller
{
    public $handler;

    public function __construct(InviteService $handler)
    {
        $this->handler = $handler;
    }

    public function lastInvite(LastInviteMessage $message)
    {
        $message->validateInput();
        $this->handler->lastInvite($message);
        $message->validateOutput();
        return $message->getResponse();
    }

}
