22 lines
595 B
PHP
22 lines
595 B
PHP
|
<?php
|
||
|
|
||
|
require_once "lib/account.php";
|
||
|
|
||
|
function endpoint($endpoint_data)
|
||
|
{
|
||
|
switch ($endpoint_data["action"]){
|
||
|
|
||
|
case "login":
|
||
|
return doLogin($endpoint_data["email"], $endpoint_data["password"]);
|
||
|
break;
|
||
|
|
||
|
case "logout":
|
||
|
return doLogout();
|
||
|
break;
|
||
|
|
||
|
case "register":
|
||
|
return doRegister($endpoint_data["firstname"], $endpoint_data["lastname"], $endpoint_data["nickname"], $endpoint_data["email"], $endpoint_data["password"], $endpoint_data["minecraftnick"], $endpoint_data["activation_token"]);
|
||
|
break;
|
||
|
|
||
|
}
|
||
|
}
|