Repo for the search and displace core module including the interface to select files and search and displace operations to run on them. https://searchanddisplace.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

59 lines
1.6 KiB

3 years ago
3 years ago
  1. <?php
  2. use App\Http\Controllers\FileController;
  3. use App\Http\Controllers\FilterController;
  4. use Illuminate\Support\Facades\Route;
  5. /*
  6. |--------------------------------------------------------------------------
  7. | API Routes
  8. |--------------------------------------------------------------------------
  9. |
  10. | Here is where you can register API routes for your application. These
  11. | routes are loaded by the RouteServiceProvider within a group which
  12. | is assigned the "api" middleware group. Enjoy building your API!
  13. |
  14. */
  15. # File routes
  16. // Route::name('file.')->prefix('file')->middleware('auth:api')->group(
  17. Route::name('file.')->prefix('file')->group(
  18. function() {
  19. # POST "/file" (used to create/upload a file)
  20. Route::post('/', [
  21. FileController::class,
  22. 'create'
  23. ])->name('create');
  24. Route::post('/convert', [
  25. FileController::class,
  26. 'convert'
  27. ])->name('convert');
  28. }
  29. );
  30. # Filter routes
  31. // Route::name('filter.')->prefix('filter')->middleware('auth:api')->group(
  32. Route::name('filter.')->prefix('filter')->group(
  33. function() {
  34. # POST "/file" (used to create/upload a file)
  35. Route::post('/', [
  36. FilterController::class,
  37. 'create'
  38. ])->name('create');
  39. # GET "/filter/all" (to retrieve data about a filter)
  40. Route::get('/all', [
  41. FilterController::class,
  42. 'get'
  43. ])->name('get.all');
  44. # GET "/filter/{id}" (to retrieve data about a filter)
  45. Route::get('/{id}', [
  46. FilterController::class,
  47. 'get'
  48. ])->name('get');
  49. }
  50. );