mirror of
https://codeberg.org/vlw/stadia-avatar.git
synced 2025-09-13 23:23:40 +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.
18 lines
No EOL
343 B
PHP
18 lines
No EOL
343 B
PHP
<?php
|
|
|
|
require "../classes/Message.php";
|
|
require "../classes/Database.php";
|
|
|
|
$sharedSecret = ""; // Key to update the database
|
|
|
|
if($sharedSecret !== "") {
|
|
error("403","Invalid shared secret.");
|
|
}
|
|
|
|
$db = new DBConnector();
|
|
|
|
if(!$db->set_avatar("foo","bario")) {
|
|
error("500","Something went wrong.");
|
|
}
|
|
|
|
echo "{\"status\":\"OK\"}"; |