mirror of
https://github.com/Shineii86/AniKotoAPI.git
synced 2026-10-22 10:55:10 +00:00
v1.9.2: Fix 3 endpoint bugs found in diagnostic sweep
- filter controller: Normalize array params to strings (genre[]=1 now works) - status controller: Map short names to full slugs (airing → currently-airing) - seasons extractor: Remove recursive API call, throw clear error - watchOrder extractor: Remove recursive API call, throw clear error Endpoint status: 27/31 passing (4 remaining: 2 source site issues, 1 AJAX issue, 1 expected behavior)
This commit is contained in:
@@ -54,7 +54,14 @@ const getStatus = async (req, res, next) => {
|
||||
if (cached) {
|
||||
return res.json({ success: true, results: cached });
|
||||
}
|
||||
const data = await extractStatus(status, page);
|
||||
// Map short status names to full slugs
|
||||
const statusMap = {
|
||||
airing: "currently-airing",
|
||||
completed: "finished-airing",
|
||||
upcoming: "not-yet-aired"
|
||||
};
|
||||
const mappedStatus = statusMap[status] || status;
|
||||
const data = await extractStatus(mappedStatus, page);
|
||||
setCache(cacheKey, data);
|
||||
res.json({ success: true, results: data });
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user