2021-06-05 09:26:32 +00:00
|
|
|
<?php
|
|
|
|
|
2021-07-26 02:24:55 +00:00
|
|
|
use App\Http\Controllers\Api\NotificationController;
|
2021-06-06 20:04:46 +00:00
|
|
|
use App\Http\Controllers\Api\ServerController;
|
2021-06-06 18:22:40 +00:00
|
|
|
use App\Http\Controllers\Api\UserController;
|
2021-07-15 20:16:26 +00:00
|
|
|
use App\Http\Controllers\Api\VoucherController;
|
2021-06-05 09:26:32 +00:00
|
|
|
use Illuminate\Support\Facades\Route;
|
|
|
|
|
|
|
|
/*
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
| 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!
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
2021-06-06 20:21:26 +00:00
|
|
|
Route::middleware('api.token')->group(function () {
|
2021-07-27 08:15:10 +00:00
|
|
|
Route::patch('/users/{user}/increment', [UserController::class, 'increment']);
|
2021-07-27 12:20:31 +00:00
|
|
|
Route::patch('/users/{user}/decrement', [UserController::class, 'decrement']);
|
2022-01-03 21:14:45 +00:00
|
|
|
Route::patch('/users/{user}/suspend', [UserController::class, 'suspend']);
|
|
|
|
Route::patch('/users/{user}/unsuspend', [UserController::class, 'unsuspend']);
|
2021-10-12 19:36:13 +00:00
|
|
|
Route::resource('users', UserController::class)->except(['create']);
|
2021-06-06 20:04:46 +00:00
|
|
|
|
2021-06-06 20:21:26 +00:00
|
|
|
Route::patch('/servers/{server}/suspend', [ServerController::class, 'suspend']);
|
|
|
|
Route::patch('/servers/{server}/unsuspend', [ServerController::class, 'unSuspend']);
|
|
|
|
Route::resource('servers', ServerController::class)->except(['store', 'create', 'edit', 'update']);
|
2021-07-15 20:16:26 +00:00
|
|
|
|
2021-07-26 02:24:55 +00:00
|
|
|
// Route::get('/vouchers/{voucher}/users' , [VoucherController::class , 'users']);
|
|
|
|
Route::resource('vouchers', VoucherController::class)->except('create', 'edit');
|
2021-06-05 09:26:32 +00:00
|
|
|
|
2021-07-26 02:24:55 +00:00
|
|
|
Route::get('/notifications/{user}', [NotificationController::class, 'index']);
|
|
|
|
Route::get('/notifications/{user}/{notification}', [NotificationController::class, 'view']);
|
2021-08-04 20:01:50 +00:00
|
|
|
Route::post('/notifications', [NotificationController::class, 'send']);
|
2021-07-26 02:24:55 +00:00
|
|
|
Route::delete('/notifications/{user}', [NotificationController::class, 'delete']);
|
|
|
|
Route::delete('/notifications/{user}/{notification}', [NotificationController::class, 'deleteOne']);
|
|
|
|
});
|