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.
 
 
 

34 lines
1.3 KiB

<?php
use Illuminate\Http\Request;
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!
|
*/
Route::get("/", function () {
return response()->json([], 401);
})->name("badtoken");
Route::middleware("auth:sanctum")->group(function () {
Route::get('/user', function (Request $request) {
return $request->user();
});
Route::get("/wishes/me", [\App\Http\Controllers\OwnWishController::class, "OwnWishes"]);
Route::post("/wishes/create", [\App\Http\Controllers\OwnWishController::class, "CreateWish"]);
Route::delete("/wishes/{wish}", [\App\Http\Controllers\OwnWishController::class, "DeleteWish"]);
Route::post("/wishes/{wish}/claim", [\App\Http\Controllers\WishController::class, "ClaimWish"]);
Route::get("/wishes/claimed", [\App\Http\Controllers\OwnWishController::class, "ClaimedWishes"]);
Route::get("/wishes/list", [\App\Http\Controllers\WishController::class, "Wishlist"]);
Route::get("/users", [\App\Http\Controllers\UserInfoController::class, "UserList"]);
});