Added new type of anime legal platforms

pull/25/head^2
Jéluchu 5 years ago
parent 412897ca90
commit 0ed7927283

@ -426,7 +426,8 @@ const getDestAnimePlatforms = async () => {
return data.map(doc =>({ return data.map(doc =>({
id: doc.id, id: doc.id,
name: doc.name, name: doc.name,
logo: doc.logo logo: doc.logo,
link: doc.link
})); }));
}; };
@ -444,7 +445,7 @@ const getPlatforms = async (id) => {
cover: doc.cover cover: doc.cover
})); }));
} if (id === "producers" || id === "apps" || id === "publishers") { } if (id === "producers" || id === "apps" || id === "publishers" || "events") {
data = await homgot(`${BASE_ARUPPI}res/documents/animelegal/type/${id}.json`, { parse: true }); data = await homgot(`${BASE_ARUPPI}res/documents/animelegal/type/${id}.json`, { parse: true });
@ -460,7 +461,9 @@ const getPlatforms = async (id) => {
twitter: doc.twitter, twitter: doc.twitter,
instagram: doc.instagram, instagram: doc.instagram,
webInfo: doc.webInfo, webInfo: doc.webInfo,
webpage: doc.webpage webpage: doc.webpage,
latitude: doc.latitude || null,
longitude: doc.longitude || null
})); }));
} else { } else {

@ -519,6 +519,7 @@ router.get('/randomAnime', (req, res) => {
api.getRandomAnime() api.getRandomAnime()
.then(anime => { .then(anime => {
if (anime) { if (anime) {
res.set('Cache-Control', 'no-store');
res.status(200).json(anime); res.status(200).json(anime);
}else { }else {
res.status(500).json({ message: 'Aruppi lost in the shell'}); res.status(500).json({ message: 'Aruppi lost in the shell'});

Loading…
Cancel
Save