adminpanel - Paaspop/Paaspop-Server GitHub Wiki

Admin panel

The admin panel is made in Express JS

API Routes

User routes

Down here you see the different routes that are used by the client app:

Name Type Route Description
Login POST /api/login Logs the user in
Register POST /api/register Submits the users info to register
Logout POST /api/logout Logs a user out
Mail checking POST /api/email_check Route to check if a email is already in use
Random name GET /api/random_name Gets a randomly generated nickname
Game status GET /api/game_status Returns if a game is currently active
Leaderboard GET /api/leaderboard Returns leaderboard data
Points GET /api/points Gets a users points

Game routes

Name Type Route Description
Start game POST /game/start Starts a game
Stop game POST /game/stop Stops a game
Start round POST /game/round_start Start the first route
(needed for joinMidGame)
Get current game GET /game/currently Get current game data
Save points POST /points/apply Send user won points in a array
body: "points":[{"user_id":"id","points":points}]

Admin routes

Name Type Route Description
Login GET /login Shows login page
Login POST /login Submits the admins login info
Logout ALL /logout Logs a user out
Home GET / Shows the home page
Users GET /users Shows all users registered
Users GET /users/:id Shows a specific user
History GET /history Shows all game history
History GET /history/:id Shows a specific game history record
Start round POST /game/admin_round_start Start the first route
(needed for joinMidGame)
⚠️ **GitHub.com Fallback** ⚠️