<?php

use Illuminate\Http\Request;
use Illuminate\Support\Facades\Route;
use App\Http\Controllers\Api\AuthController;

/*
|--------------------------------------------------------------------------
| 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!
|
*/

// Route::middleware('auth:api')->get('/user', function (Request $request) {
//     return $request->user();
// });
// Route::prefix("gps")->group(function () {
Route::post("/v1/dummy/haversineGreatCircleDistance", "DummyController@api_haversineGreatCircleDistance");
Route::post("/v1/dummy/addBatchDummyTracks", "DummyController@api_addBatchDummyTracks");
Route::get("/v1/dummy/getTracksBySeconds", "DummyController@api_getTracksBySeconds");
Route::post("/v1/dummy/addDummyHub", "DummyController@api_addDummyHub");
Route::post("/v1/dummy/nearestHub", "DummyController@api_nearestHub");

Route::post("/v1/login", "AuthController@api_login")->name("api_login");
Route::post("/v1/logout", "AuthController@api_logout")->name("api_logout");
// Route::post('/v1/profile', 'AuthController@api_profile')->name('api_profile');

Route::post("/v1/inject/add_gps_zones_v1", "InjectController@add_gps_zones_v1");
Route::post("/v1/inject/add_vhc_tracks_v1", "InjectController@add_vhc_tracks_v1");
Route::post("/v1/inject/add_conf_rate_v1", "InjectController@add_conf_rate_v1");

Route::post("/v1/storage/save_photos", "StorageController@save_photos")->name("api_storage_save_photos");

Route::post("auth/login", [AuthController::class, "login"]);

Route::get("/view/vehicle-trip-detail/{token}", "ReportsController@api_view_trip_detail")->name("api_view_trip_detail");

// });
