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

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