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.

64 lines
1.7 KiB

3 years ago
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. Route::delete('/{id}', [
  29. FileController::class,
  30. 'delete'
  31. ]);
  32. }
  33. );
  34. # Filter routes
  35. // Route::name('filter.')->prefix('filter')->middleware('auth:api')->group(
  36. Route::name('filter.')->prefix('filter')->group(
  37. function() {
  38. # POST "/file" (used to create/upload a file)
  39. Route::post('/', [
  40. FilterController::class,
  41. 'create'
  42. ])->name('create');
  43. # GET "/filter/all" (to retrieve data about a filter)
  44. Route::get('/all', [
  45. FilterController::class,
  46. 'get'
  47. ])->name('get.all');
  48. # GET "/filter/{id}" (to retrieve data about a filter)
  49. Route::get('/{id}', [
  50. FilterController::class,
  51. 'get'
  52. ])->name('get');
  53. }
  54. );