mirror of
https://github.com/Znote/ZnoteAAC.git
synced 2025-10-14 02:14:53 +02:00
Started with JSON API module system
This commit is contained in:
15
api/modules/towns/getTownNames.php
Normal file
15
api/modules/towns/getTownNames.php
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php require_once '../../module.php';
|
||||
|
||||
// Configure module version number
|
||||
$response['version']['module'] = 1;
|
||||
|
||||
// Fetch towns
|
||||
$response['data']['towns'] = $config['towns'];
|
||||
|
||||
// Fetch towns available under character creation
|
||||
foreach ($config['available_towns'] as $id) {
|
||||
$response['data']['available'][$id] = $response['data']['towns'][$id];
|
||||
}
|
||||
|
||||
SendResponse($response);
|
||||
?>
|
Reference in New Issue
Block a user