stadia-avatar/endpoint/update.php
Victor Westerlund ef58aa530e Added DB interface and get/update endpoints.
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.
2021-02-04 17:50:24 +01:00

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\"}";