feat: deep link added
This commit is contained in:
@@ -52,6 +52,12 @@
|
||||
|
||||
|
||||
Route::get('package-names/{name}/products', [ProductController::class, 'index']);
|
||||
|
||||
// Public deep links — allow hidden (is_deeplink_only) media/categories to be
|
||||
// fetched without authentication when reached via their share link.
|
||||
Route::get('public/media/{id}', [MediaController::class, 'publicShow']);
|
||||
Route::get('public/categories/{id}', [CategoryController::class, 'publicShow']);
|
||||
|
||||
Route::prefix('auth')->controller(UserController::class)->group(function () {
|
||||
Route::post('login-with-approo-v2', [UserController::class, 'loginV2']);
|
||||
Route::middleware(['throttle:3,1'])->post('login-otp', 'loginOTP');
|
||||
|
||||
@@ -1,7 +1,14 @@
|
||||
<?php
|
||||
|
||||
use App\Http\Controllers\CategoryController;
|
||||
use App\Http\Controllers\MediaController;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
|
||||
Route::get('/', function () {
|
||||
return view('welcome');
|
||||
});
|
||||
|
||||
// Canonical deep links (e.g. https://aramejan.com/media/3). Served as JSON so
|
||||
// the mobile app / web can fetch the hidden item reached through the deep link.
|
||||
Route::get('/media/{id}', [MediaController::class, 'publicShow']);
|
||||
Route::get('/category/{id}', [CategoryController::class, 'publicShow']);
|
||||
Reference in New Issue
Block a user