aboutsummaryrefslogtreecommitdiffhomepage
path: root/main/app/sprinkles/admin/routes/posts.php
blob: 9ae7d70bdf0749a14c55db1ba948eecd1fd64fc6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<?php
/**
 * UserFrosting (http://www.userfrosting.com)
 *
 * @link      https://github.com/userfrosting/UserFrosting
 * @license   https://github.com/userfrosting/UserFrosting/blob/master/licenses/UserFrosting.md (MIT License)
 */

/**
 * Routes for posting.
 */
$app->get('/image/{post_id}', 'UserFrosting\Sprinkle\Admin\Controller\PostController:showImage')->add('authGuard');

$app->get('/api/feed/{user_name}', 'UserFrosting\Sprinkle\Admin\Controller\PostController:getFeed')->add('authGuard');

$app->group('/api/posts', function () {
    $this->post('/image', 'UserFrosting\Sprinkle\Admin\Controller\PostController:postImage');
})->add('authGuard');