mirror of
https://codeberg.org/vlw/stadia-avatar.git
synced 2025-09-14 07:23:41 +02:00
The bot userscript is now fully operational, the only thing left to do is to make it send the actual payload we need for the endpoint. Added setup for MySQL database. Added DB interface with a concept-stage set/update endpoint.
16 lines
No EOL
355 B
PHP
16 lines
No EOL
355 B
PHP
<?php
|
|
|
|
require "../classes/Message.php";
|
|
require "../classes/Database.php";
|
|
|
|
$user_id = $_GET["userID"] ?? error("400","No userID provided");
|
|
|
|
$db = new DBConnector();
|
|
$avatar = $db->get_avatar($user_id);
|
|
|
|
if($avatar) {
|
|
echo "{\"status\":\"OK\",\"avatar\":\"${avatar}\"}";
|
|
return;
|
|
}
|
|
|
|
error("404","No avatar was found for the supplied userID"); |