mirror of
https://codeberg.org/vlw/stadia-avatar.git
synced 2025-09-13 23:23:40 +02:00
Added new extension of DBConnector called StadiaAvatarDB. This class contains all avatar manipulation queries. Fixed get and update. Added Gravatar hash generator.
15 lines
No EOL
350 B
PHP
15 lines
No EOL
350 B
PHP
<?php
|
|
|
|
require "../classes/Message.php";
|
|
require "../classes/Database.php";
|
|
|
|
$user_id = $_GET["userID"] ?? error("400","No userID provided");
|
|
|
|
$db = new StadiaAvatarDB();
|
|
$avatar = $db->get_avatar($user_id);
|
|
|
|
if(!$avatar) {
|
|
error("404","No avatar was found for the supplied userID");
|
|
}
|
|
|
|
echo "{\"status\":\"OK\",\"avatar\":\"${avatar}\"}"; |