CommonController.php 591 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. namespace App\Generated\Controllers\V1;
  3. use App\Http\Services\V1\CommonService;
  4. use App\Http\Controllers\Controller;
  5. use App\Generated\V1\Messages\Common\FaceDetectMessage;
  6. use DB;
  7. class CommonController extends Controller
  8. {
  9. public $handler;
  10. public function __construct(CommonService $handler)
  11. {
  12. $this->handler = $handler;
  13. }
  14. public function faceDetect(FaceDetectMessage $message)
  15. {
  16. $message->validateInput();
  17. $this->handler->faceDetect($message);
  18. $message->validateOutput();
  19. return $message->getResponse();
  20. }
  21. }