Version 1.0 #102
@@ -17,6 +17,7 @@ class GameController extends Controller
|
|||||||
$user = Auth::user();
|
$user = Auth::user();
|
||||||
$query = Game::query()->with(["winner", "player1", "player2"]);
|
$query = Game::query()->with(["winner", "player1", "player2"]);
|
||||||
|
|
||||||
|
// Se não for Admin, mostra apenas os jogos do utilizador
|
||||||
if ($user->type !== 'A') {
|
if ($user->type !== 'A') {
|
||||||
$query->where(function ($q) use ($user) {
|
$query->where(function ($q) use ($user) {
|
||||||
$q->where('player1_user_id', $user->id)
|
$q->where('player1_user_id', $user->id)
|
||||||
@@ -49,6 +50,59 @@ class GameController extends Controller
|
|||||||
return response()->json($query->paginate(15));
|
return response()->json($query->paginate(15));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// --- MÉTODOS ADICIONADOS ---
|
||||||
|
|
||||||
|
// Host a new multiplayer Game
|
||||||
|
public function host(Request $request)
|
||||||
|
{
|
||||||
|
$request->validate([
|
||||||
|
'type' => 'required|in:3,9'
|
||||||
|
]);
|
||||||
|
|
||||||
|
$user = $request->user();
|
||||||
|
|
||||||
|
// Check for active game
|
||||||
|
$activeGame = Game::where(function ($q) use ($user) {
|
||||||
|
$q->where("player1_user_id", $user->id)
|
||||||
|
->orWhere("player2_user_id", $user->id);
|
||||||
|
})
|
||||||
|
->whereIn("status", ["Pending", "Playing"])
|
||||||
|
->exists();
|
||||||
|
|
||||||
|
if ($activeGame) {
|
||||||
|
return response()->json(["message" => "You already have an active game."], 400);
|
||||||
|
}
|
||||||
|
|
||||||
|
$game = Game::create([
|
||||||
|
'type' => $request->type,
|
||||||
|
'status' => 'Pending',
|
||||||
|
'player1_user_id' => $user->id,
|
||||||
|
'player2_user_id' => self::GHOST_ID, // Ghost ID = 1 (Waiting for player)
|
||||||
|
'began_at' => now(),
|
||||||
|
'player1_points' => 0,
|
||||||
|
'player2_points' => 0,
|
||||||
|
]);
|
||||||
|
|
||||||
|
return response()->json($game, 201);
|
||||||
|
}
|
||||||
|
|
||||||
|
// List open games (Available to join)
|
||||||
|
public function open(Request $request)
|
||||||
|
{
|
||||||
|
$type = $request->query('type', '9');
|
||||||
|
$GHOST_ID = 1;
|
||||||
|
|
||||||
|
$games = Game::where('status', 'Pending')
|
||||||
|
->where('player2_user_id', $GHOST_ID) // Games waiting for P2
|
||||||
|
->where('type', $type)
|
||||||
|
->with('player1')
|
||||||
|
->orderBy('began_at', 'asc')
|
||||||
|
->paginate(10);
|
||||||
|
|
||||||
|
return response()->json($games);
|
||||||
|
}
|
||||||
|
// ---------------------------
|
||||||
|
|
||||||
public function store(Request $request)
|
public function store(Request $request)
|
||||||
{
|
{
|
||||||
$this->authorize('create', Game::class);
|
$this->authorize('create', Game::class);
|
||||||
@@ -78,6 +132,7 @@ class GameController extends Controller
|
|||||||
|
|
||||||
$initialStatus = $request->input('status', 'Pending');
|
$initialStatus = $request->input('status', 'Pending');
|
||||||
|
|
||||||
|
// If specific player 2 is provided, auto-start game
|
||||||
if ($player2Id !== self::GHOST_ID && !$request->has('status')) {
|
if ($player2Id !== self::GHOST_ID && !$request->has('status')) {
|
||||||
$initialStatus = 'Playing';
|
$initialStatus = 'Playing';
|
||||||
}
|
}
|
||||||
@@ -105,7 +160,7 @@ class GameController extends Controller
|
|||||||
public function join(Request $request, Game $game)
|
public function join(Request $request, Game $game)
|
||||||
{
|
{
|
||||||
// Prevent joining if already full or started
|
// Prevent joining if already full or started
|
||||||
if ($game->status !== 'Pending' || $game->player2_user_id !== 1) {
|
if ($game->status !== 'Pending' || $game->player2_user_id !== self::GHOST_ID) {
|
||||||
return response()->json(['message' => 'Game is not available'], 400);
|
return response()->json(['message' => 'Game is not available'], 400);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -114,6 +169,18 @@ class GameController extends Controller
|
|||||||
return response()->json(['message' => 'Cannot join your own game'], 400);
|
return response()->json(['message' => 'Cannot join your own game'], 400);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Check if joining user has another active game
|
||||||
|
$activeGame = Game::where(function ($q) use ($request) {
|
||||||
|
$q->where("player1_user_id", $request->user()->id)
|
||||||
|
->orWhere("player2_user_id", $request->user()->id);
|
||||||
|
})
|
||||||
|
->whereIn("status", ["Pending", "Playing"])
|
||||||
|
->exists();
|
||||||
|
|
||||||
|
if ($activeGame) {
|
||||||
|
return response()->json(["message" => "You already have an active game."], 400);
|
||||||
|
}
|
||||||
|
|
||||||
$game->update([
|
$game->update([
|
||||||
'player2_user_id' => $request->user()->id,
|
'player2_user_id' => $request->user()->id,
|
||||||
'status' => 'Playing',
|
'status' => 'Playing',
|
||||||
|
|||||||
@@ -3,12 +3,10 @@
|
|||||||
namespace App\Http\Controllers;
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
use App\Models\MatchGame;
|
use App\Models\MatchGame;
|
||||||
use App\Models\Game;
|
|
||||||
use App\Models\CoinTransaction;
|
use App\Models\CoinTransaction;
|
||||||
use App\Models\CoinTransactionType;
|
use App\Models\CoinTransactionType;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use App\Http\Requests\StoreMatchRequest;
|
use App\Http\Requests\StoreMatchRequest;
|
||||||
use Illuminate\Support\Facades\Auth;
|
|
||||||
use Illuminate\Support\Facades\DB;
|
use Illuminate\Support\Facades\DB;
|
||||||
|
|
||||||
class MatchController extends Controller
|
class MatchController extends Controller
|
||||||
@@ -196,4 +194,77 @@ class MatchController extends Controller
|
|||||||
return response()->json($match);
|
return response()->json($match);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function host(Request $request)
|
||||||
|
{
|
||||||
|
$request->validate([
|
||||||
|
'type' => 'required|in:3,9',
|
||||||
|
'stake' => 'required|integer|min:0'
|
||||||
|
]);
|
||||||
|
|
||||||
|
$user = $request->user();
|
||||||
|
$stake = $request->stake;
|
||||||
|
|
||||||
|
if ($user->coins_balance < $stake) {
|
||||||
|
return response()->json(['message' => 'Insufficient coin balance'], 400);
|
||||||
|
}
|
||||||
|
|
||||||
|
$activeMatch = MatchGame::where(function ($q) use ($user) {
|
||||||
|
$q->where('player1_user_id', $user->id)
|
||||||
|
->orWhere('player2_user_id', $user->id);
|
||||||
|
})->whereIn('status', ['Pending', 'Playing'])->exists();
|
||||||
|
|
||||||
|
if ($activeMatch) {
|
||||||
|
return response()->json(['message' => 'You already have an active match.'], 400);
|
||||||
|
}
|
||||||
|
|
||||||
|
return DB::transaction(function () use ($request, $user, $stake) {
|
||||||
|
$GHOST_ID = 1;
|
||||||
|
|
||||||
|
$user->decrement('coins_balance', $stake);
|
||||||
|
|
||||||
|
$stakeType = CoinTransactionType::firstOrCreate(
|
||||||
|
['name' => 'Match stake'],
|
||||||
|
['type' => 'D'] // Debit
|
||||||
|
);
|
||||||
|
|
||||||
|
$match = MatchGame::create([
|
||||||
|
'type' => $request->type,
|
||||||
|
'status' => 'Pending',
|
||||||
|
'player1_user_id' => $user->id,
|
||||||
|
'player2_user_id' => $GHOST_ID,
|
||||||
|
'winner_user_id' => null,
|
||||||
|
'loser_user_id' => null,
|
||||||
|
'stake' => $stake,
|
||||||
|
'began_at' => now(),
|
||||||
|
'player1_marks' => 0, 'player2_marks' => 0,
|
||||||
|
'player1_points' => 0, 'player2_points' => 0,
|
||||||
|
]);
|
||||||
|
|
||||||
|
CoinTransaction::create([
|
||||||
|
'user_id' => $user->id,
|
||||||
|
'match_id' => $match->id,
|
||||||
|
'coin_transaction_type_id' => $stakeType->id,
|
||||||
|
'transaction_datetime' => now(),
|
||||||
|
'coins' => -$stake,
|
||||||
|
]);
|
||||||
|
|
||||||
|
return response()->json($match, 201);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public function open(Request $request)
|
||||||
|
{
|
||||||
|
$type = $request->query('type', '9');
|
||||||
|
$GHOST_ID = 1;
|
||||||
|
|
||||||
|
$matches = MatchGame::where('status', 'Pending')
|
||||||
|
->where('player2_user_id', $GHOST_ID)
|
||||||
|
->where('type', $type)
|
||||||
|
->with('player1')
|
||||||
|
->orderBy('began_at', 'asc')
|
||||||
|
->paginate(10);
|
||||||
|
|
||||||
|
return response()->json($matches);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -4,6 +4,7 @@ namespace App\Http\Controllers;
|
|||||||
|
|
||||||
use App\Models\Game;
|
use App\Models\Game;
|
||||||
use App\Models\User;
|
use App\Models\User;
|
||||||
|
use App\Models\MatchGame;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Illuminate\Support\Facades\Auth;
|
use Illuminate\Support\Facades\Auth;
|
||||||
use Illuminate\Support\Facades\Hash;
|
use Illuminate\Support\Facades\Hash;
|
||||||
@@ -178,22 +179,15 @@ class UserController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* GET /api/users/{user}/matches
|
* GET /api/users/{user}/games
|
||||||
* Histórico de Jogos Multiplayer do Utilizador
|
* Histórico de Partidas Individuais (Cartas)
|
||||||
*/
|
*/
|
||||||
public function getMatches(Request $request, User $user)
|
public function getGames(Request $request, User $user)
|
||||||
{
|
{
|
||||||
$this->authorize('view', $user);
|
$this->authorize('view', $user);
|
||||||
|
|
||||||
$outcomeSql = "CASE
|
// Define a query base para GAMES
|
||||||
WHEN is_draw = 1 THEN 'DRAW'
|
$query = \App\Models\Game::query()
|
||||||
WHEN winner_user_id = {$user->id} THEN 'WIN'
|
|
||||||
ELSE 'LOSS'
|
|
||||||
END";
|
|
||||||
|
|
||||||
$query = Game::query()
|
|
||||||
->select('*')
|
|
||||||
->selectRaw("($outcomeSql) as outcome_text")
|
|
||||||
->where(function ($q) use ($user) {
|
->where(function ($q) use ($user) {
|
||||||
$q->where('player1_user_id', $user->id)
|
$q->where('player1_user_id', $user->id)
|
||||||
->orWhere('player2_user_id', $user->id);
|
->orWhere('player2_user_id', $user->id);
|
||||||
@@ -208,42 +202,64 @@ class UserController extends Controller
|
|||||||
$query->where('status', $request->status);
|
$query->where('status', $request->status);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($request->filled('outcome')) {
|
$sortDirection = $request->get('sort_direction', 'desc');
|
||||||
switch ($request->outcome) {
|
$query->orderBy('began_at', $sortDirection);
|
||||||
case 'win':
|
|
||||||
$query->where('winner_user_id', $user->id)
|
|
||||||
->where('is_draw', 0);
|
|
||||||
break;
|
|
||||||
case 'loss':
|
|
||||||
case 'forfeit': // Forfeit treated as loss for now
|
|
||||||
$query->where('loser_user_id', $user->id)
|
|
||||||
->where('is_draw', 0);
|
|
||||||
break;
|
|
||||||
case 'draw':
|
|
||||||
$query->where('is_draw', 1);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($request->has('date_from')) {
|
|
||||||
$query->whereDate('began_at', '>=', $request->date_from);
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($request->has('date_to')) {
|
$games = $query->paginate(10);
|
||||||
$query->whereDate('ended_at', '<=', $request->date_to);
|
|
||||||
}
|
|
||||||
|
|
||||||
$order = $request->get('sort_by', 'began_at');
|
$games->getCollection()->transform(function ($game) use ($user) {
|
||||||
$direction = $request->get('sort_direction', 'desc');
|
if ($game->winner_user_id == $user->id) {
|
||||||
|
$game->outcome = 'win';
|
||||||
if ($order === 'outcome') {
|
} elseif ($game->is_draw) {
|
||||||
$query->orderBy('outcome_text', $direction);
|
$game->outcome = 'draw';
|
||||||
} else {
|
} else {
|
||||||
$query->orderBy($order, $direction);
|
$game->outcome = 'loss';
|
||||||
|
}
|
||||||
|
return $game;
|
||||||
|
});
|
||||||
|
|
||||||
|
return response()->json($games);
|
||||||
}
|
}
|
||||||
|
|
||||||
$matches = $query->orderBy($order, $direction)
|
/**
|
||||||
->paginate(10);
|
* GET /api/users/{user}/matches
|
||||||
|
* Histórico de Matches (Apostas / Marcas)
|
||||||
|
*/
|
||||||
|
public function getMatches(Request $request, User $user)
|
||||||
|
{
|
||||||
|
$this->authorize('view', $user);
|
||||||
|
|
||||||
|
$query = MatchGame::query()
|
||||||
|
->where(function ($q) use ($user) {
|
||||||
|
$q->where('player1_user_id', $user->id)
|
||||||
|
->orWhere('player2_user_id', $user->id);
|
||||||
|
})
|
||||||
|
->with(['winner', 'player1', 'player2']);
|
||||||
|
|
||||||
|
if ($request->has('type')) {
|
||||||
|
$query->where('type', $request->type);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($request->has('status')) {
|
||||||
|
$query->where('status', $request->status);
|
||||||
|
}
|
||||||
|
|
||||||
|
$sortDirection = $request->get('sort_direction', 'desc');
|
||||||
|
$query->orderBy('began_at', $sortDirection);
|
||||||
|
|
||||||
|
$matches = $query->paginate(10);
|
||||||
|
|
||||||
|
$matches->getCollection()->transform(function ($match) use ($user) {
|
||||||
|
if ($match->winner_user_id == $user->id) {
|
||||||
|
$match->outcome = 'win';
|
||||||
|
} elseif ($match->winner_user_id && $match->winner_user_id != $user->id) {
|
||||||
|
$match->outcome = 'loss';
|
||||||
|
} else {
|
||||||
|
$match->outcome = 'interrupted'; // Matches geralmente não empatam (alguém chega a 4 marcas)
|
||||||
|
}
|
||||||
|
return $match;
|
||||||
|
});
|
||||||
|
|
||||||
return response()->json($matches);
|
return response()->json($matches);
|
||||||
}
|
}
|
||||||
|
|||||||
+8
-35
@@ -40,45 +40,14 @@ Route::prefix('v1')->group(function () {
|
|||||||
// User Resources
|
// User Resources
|
||||||
Route::prefix('/users')->group(function () {
|
Route::prefix('/users')->group(function () {
|
||||||
Route::get('/{user}', [UserController::class, 'show']);
|
Route::get('/{user}', [UserController::class, 'show']);
|
||||||
Route::get('/{user}/matches', [
|
|
||||||
UserController::class,
|
|
||||||
'getMatches',
|
|
||||||
]);
|
|
||||||
Route::get('/{user}/transactions', [UserController::class, 'getTransactions']);
|
Route::get('/{user}/transactions', [UserController::class, 'getTransactions']);
|
||||||
|
Route::get('/{user}/games', [UserController::class, 'getGames']);
|
||||||
|
Route::get('/{user}/matches', [UserController::class, 'getMatches']);
|
||||||
});
|
});
|
||||||
|
|
||||||
Route::prefix('games')->group(function () {
|
Route::prefix('games')->group(function () {
|
||||||
//Host a new multiplayer game - MUST come before resource routes
|
Route::post('host', [GameController::class, 'host']);
|
||||||
Route::post('host', function (\Illuminate\Http\Request $request) {
|
Route::get('open', [GameController::class, 'open']);
|
||||||
$request->validate([
|
|
||||||
'type' => 'required|in:3,9'
|
|
||||||
]);
|
|
||||||
|
|
||||||
$game = \App\Models\Game::create([
|
|
||||||
'type' => $request->type,
|
|
||||||
'status' => 'Pending',
|
|
||||||
'player1_user_id' => $request->user()->id,
|
|
||||||
'player2_user_id' => 1, // Ghost player
|
|
||||||
'began_at' => now(),
|
|
||||||
]);
|
|
||||||
|
|
||||||
return response()->json($game);
|
|
||||||
});
|
|
||||||
|
|
||||||
// List open games (available to join)
|
|
||||||
Route::get('open', function (\Illuminate\Http\Request $request) {
|
|
||||||
$type = $request->query('type', '9');
|
|
||||||
|
|
||||||
$games = \App\Models\Game::where('status', 'Pending')
|
|
||||||
->where('player2_user_id', 1) // Only games waiting for a second player
|
|
||||||
->where('type', $type)
|
|
||||||
->with('player1') // Load player1 relationship
|
|
||||||
->orderBy('began_at', 'asc')
|
|
||||||
->paginate(10);
|
|
||||||
|
|
||||||
return response()->json($games);
|
|
||||||
});
|
|
||||||
|
|
||||||
Route::get('/', [GameController::class, 'index']);
|
Route::get('/', [GameController::class, 'index']);
|
||||||
Route::get('/{game}', [GameController::class, 'show']);
|
Route::get('/{game}', [GameController::class, 'show']);
|
||||||
Route::post('/', [GameController::class, 'store']);
|
Route::post('/', [GameController::class, 'store']);
|
||||||
@@ -91,6 +60,8 @@ Route::prefix('v1')->group(function () {
|
|||||||
Route::prefix('matches')->group(function () {
|
Route::prefix('matches')->group(function () {
|
||||||
Route::apiResource('/', MatchController::class)->parameters(['' => 'match']);
|
Route::apiResource('/', MatchController::class)->parameters(['' => 'match']);
|
||||||
Route::post('/{match}/join', [MatchController::class, 'join']);
|
Route::post('/{match}/join', [MatchController::class, 'join']);
|
||||||
|
Route::post('host', [MatchController::class, 'host']); // <--- NOVA
|
||||||
|
Route::get('open', [MatchController::class, 'open']);
|
||||||
});
|
});
|
||||||
|
|
||||||
// Admin Routes
|
// Admin Routes
|
||||||
@@ -99,6 +70,8 @@ Route::prefix('v1')->group(function () {
|
|||||||
->group(function () {
|
->group(function () {
|
||||||
Route::get('/statistics', [StatisticsController::class, 'getAdminStats']);
|
Route::get('/statistics', [StatisticsController::class, 'getAdminStats']);
|
||||||
Route::get('/transactions', [TransactionController::class, 'index']);
|
Route::get('/transactions', [TransactionController::class, 'index']);
|
||||||
|
Route::get('/games', [GameController::class, 'index']);
|
||||||
|
Route::get('/matches', [MatchController::class, 'index']);
|
||||||
Route::prefix('users')->group(function () {
|
Route::prefix('users')->group(function () {
|
||||||
Route::get('/', [UserController::class, 'index']);
|
Route::get('/', [UserController::class, 'index']);
|
||||||
Route::post('/', [UserController::class, 'store']);
|
Route::post('/', [UserController::class, 'store']);
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -76,6 +76,23 @@ export const useAPIStore = defineStore('api', () => {
|
|||||||
return axios.get(`${API_BASE_URL}/games?${queryParams}`)
|
return axios.get(`${API_BASE_URL}/games?${queryParams}`)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// --- ADICIONADO: Função que faltava ---
|
||||||
|
const getCurrentUserGames = (params = {}) => {
|
||||||
|
const queryParams = new URLSearchParams({
|
||||||
|
page: params.page || 1,
|
||||||
|
...(params.type && { type: params.type }),
|
||||||
|
...(params.outcome && { outcome: params.outcome }),
|
||||||
|
...(params.status && { status: params.status }),
|
||||||
|
...(params.date_from && { date_from: params.date_from }),
|
||||||
|
...(params.date_to && { date_to: params.date_to }),
|
||||||
|
sort_by: params.sort_by || 'began_at',
|
||||||
|
sort_direction: params.sort_direction || 'desc',
|
||||||
|
}).toString()
|
||||||
|
|
||||||
|
return axios.get(`${API_BASE_URL}/users/${authStore.currentUserID}/games?${queryParams}`)
|
||||||
|
}
|
||||||
|
// --------------------------------------
|
||||||
|
|
||||||
const getCurrentUserMatches = (params = {}) => {
|
const getCurrentUserMatches = (params = {}) => {
|
||||||
const queryParams = new URLSearchParams({
|
const queryParams = new URLSearchParams({
|
||||||
page: params.page || 1,
|
page: params.page || 1,
|
||||||
@@ -157,19 +174,34 @@ export const useAPIStore = defineStore('api', () => {
|
|||||||
...(params.sort_direction == 'asc' && { sort_direction: 'asc' }),
|
...(params.sort_direction == 'asc' && { sort_direction: 'asc' }),
|
||||||
...(params.type && { type: params.type }),
|
...(params.type && { type: params.type }),
|
||||||
}).toString()
|
}).toString()
|
||||||
|
|
||||||
return axios.get(`${API_BASE_URL}/games?${queryParams}`)
|
return axios.get(`${API_BASE_URL}/games?${queryParams}`)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const getAdminMatches = (params = {}) => {
|
||||||
|
const queryParams = new URLSearchParams({
|
||||||
|
page: params.page || 1,
|
||||||
|
...(params.type && { type: params.type }),
|
||||||
|
...(params.outcome && { outcome: params.outcome }),
|
||||||
|
...(params.date_from && { date_from: params.date_from }),
|
||||||
|
...(params.date_to && { date_to: params.date_to }),
|
||||||
|
sort_by: params.sort_by || 'began_at',
|
||||||
|
sort_direction: params.sort_direction || 'desc',
|
||||||
|
}).toString()
|
||||||
|
|
||||||
|
return axios.get(`${API_BASE_URL}/matches?${queryParams}`)
|
||||||
|
}
|
||||||
|
|
||||||
const postAdmin = async (credentials) => {
|
const postAdmin = async (credentials) => {
|
||||||
return axios.post(`${API_BASE_URL}/admin/users`, credentials)
|
return axios.post(`${API_BASE_URL}/admin/users`, credentials)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
postLogin,
|
postLogin,
|
||||||
postLogout,
|
postLogout,
|
||||||
getAuthUser,
|
getAuthUser,
|
||||||
getGames,
|
getGames,
|
||||||
|
getCurrentUserGames,
|
||||||
getCurrentUserMatches,
|
getCurrentUserMatches,
|
||||||
getCurrentUserTransactions,
|
getCurrentUserTransactions,
|
||||||
getCurrentUserStats,
|
getCurrentUserStats,
|
||||||
@@ -182,6 +214,7 @@ export const useAPIStore = defineStore('api', () => {
|
|||||||
deleteUser,
|
deleteUser,
|
||||||
getAdminTransactions,
|
getAdminTransactions,
|
||||||
getAdminGames,
|
getAdminGames,
|
||||||
|
getAdminMatches,
|
||||||
postAdmin,
|
postAdmin,
|
||||||
gameQueryParameters,
|
gameQueryParameters,
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user