* Removed unecesery home page * Added PHP Api that provides auth and replaces the json-server for data storage * Added support for alternate geocode-api * Added registration page
11 lines
358 B
PHP
11 lines
358 B
PHP
<?php
|
|
require_once 'config/auth.php';
|
|
|
|
session_start();
|
|
if (isset($_SESSION['name'])) {
|
|
echo json_encode(['message' => 'Authorized', 'user' => $_SESSION['name'] , 'allowRegistration' => $AllowUserRegistration]);
|
|
} else {
|
|
http_response_code(401);
|
|
echo json_encode(['message' => 'Unauthorized', 'allowRegistration' => $AllowUserRegistration]);
|
|
}
|