<?php

use Illuminate\Http\Request;

/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/




//
$api = app('Dingo\Api\Routing\Router');
//
$api->version('v1', ['namespace' => 'App\Http\Controllers\Api\V1'], function ($api) {
//    // test
    $api->post('/login', [
        'as' => 'login.login',
        'uses' => 'LoginController@login',
    ]);

    Route::group(['middleware' => 'auth:api'], function(){

    });
    $api->get('/index/menu', 'IndexController@indexMenu');
    $api->get('/index/message', 'IndexController@indexMessage');
    $api->get('/index/get_message', 'IndexController@indexGetMessage');
    $api->get('index/tag', 'IndexController@indexTag');
    $api->get('index/tag', 'IndexController@indexTag');
    $api->post('/user/release', 'UserController@userRelease');
    $api->get('/user/edit_favorite', 'UserController@userEditFavorite');
    $api->get('/user/favorite', 'UserController@userFavorite');
    $api->get('/user/my_message', 'UserController@userMyMessage');
    $api->get('/user/get_message', 'UserController@userGetMessages');
    $api->get('/user/message_detail', 'UserController@userMessageDetail');
    $api->post('/attachment/upload', 'AttachmentController@upload');
//    $api->post('auth/logout', [
//        'as' => 'auth.logout',
//        'uses' => 'AuthController@logout',
//    ]);
//    $api->post('auth/code', [
//        'as' => 'auth.code',
//        'uses' => 'AuthController@getCode',
//    ]);
//    // signup
//    $api->post('auth/register', [
//        'as' => 'auth.register',
//        'uses' => 'AuthController@register',
//    ]);
//    $api->post('auth/password', [
//        'as' => 'auth.reset',
//        'uses' => 'AuthController@setPassword',
//    ]);
//    $api->post('auth/check_password', [
//        'as' => 'auth.check_password',
//        'uses' => 'AuthController@check_password',
//    ]);
//    $api->post('auth/reset', [
//        'as' => 'auth.reset',
//        'uses' => 'AuthController@reset',
//    ]);
//    $api->get('auth/is_login', [
//        'as' => 'auth.is_login',
//        'uses' => 'AuthController@isLogin',
//    ]);
});