add scanlator and people in db

main
cynic 4 years ago
parent 7731a61f30
commit e7eef743fc
  1. 2
      db/info.json
  2. 19
      db/test.json
  3. 2
      instance.php
  4. 4
      routes.php

@ -4,5 +4,5 @@
"operator": "cynic",
"icon": "",
"description": "aaaathats4as",
"version": "0.1"
"version": "0.1-php"
}

@ -1,3 +1,5 @@
{
"manga":
[
{
"info":
@ -31,10 +33,10 @@
"country_of_origin": "JP",
"publication_status": "Ongoing",
"scanlation_status": true,
"mal_id": 0,
"anilist_id": 0,
"mangaupdates_id": 0,
"last_updated": 1617791510,
"mal_id": 656,
"anilist_id": 30656,
"mangaupdates_id": 387,
"last_updated": 1620137233,
"chapter_count": 328
},
"chapters":
@ -4633,4 +4635,13 @@
}
]
}
],
"people":
[
],
"scanlators":
[
]
}

@ -11,7 +11,7 @@ class ml
}
function getManga($id)
{
foreach ($this->db as $manga)
foreach ($this->db["manga"] as $manga)
{
if ($manga["info"]["id"] == $id)
{

@ -2,6 +2,7 @@
include_once("instance.php");
function route($path, $ml)
{
header('Content-Type:application/json');
switch ($path)
{
case "/info":
@ -9,7 +10,7 @@ function route($path, $ml)
break;
case "/manga/search":
$response = [];
foreach ($ml->db as $manga)
foreach ($ml->db["manga"] as $manga)
{
array_push($response, $manga["info"]);
}
@ -40,7 +41,6 @@ function route($path, $ml)
break;
default:
http_response_code(404);
return("lol@".$path);
}
}
?>
Loading…
Cancel
Save