Created shortcode creation rest endpoint

This commit is contained in:
Alejandro Celaya
2016-06-12 17:51:30 +02:00
parent 8a7d5a499e
commit 1fbefbbd15
4 changed files with 135 additions and 2 deletions

View File

@@ -1,5 +1,6 @@
<?php
use Acelaya\UrlShortener\Middleware\Routable;
use Acelaya\UrlShortener\Middleware\Rest;
return [
@@ -10,6 +11,14 @@ return [
'middleware' => Routable\RedirectMiddleware::class,
'allowed_methods' => ['GET'],
],
// Rest
[
'name' => 'rest-create-shortcode',
'path' => '/rest/short-code',
'middleware' => Rest\CreateShortcodeMiddleware::class,
'allowed_methods' => ['POST'],
],
],
];