diff --git a/lib/routes/touhougarakuta/index.js b/lib/routes/touhougarakuta/index.js
index c5c240bf8..e895490c3 100644
--- a/lib/routes/touhougarakuta/index.js
+++ b/lib/routes/touhougarakuta/index.js
@@ -16,7 +16,7 @@ module.exports = async (ctx) => {
const response = await got({
method: 'get',
- url: `${baseUrl}/page-data/${type}/page-data.json`,
+ url: `${baseUrl}/page-data/${type === 'interviews' ? 'tags/interviews' : type}/page-data.json`,
});
ctx.state.data = {
@@ -33,6 +33,7 @@ module.exports = async (ctx) => {
try {
switch (article.type) {
case 'index_interview':
+ case 'column':
result.description = j2h.indexInterview(article, language);
break;
case 'index_comic':
@@ -42,6 +43,7 @@ module.exports = async (ctx) => {
result.description = j2h.indexNovel(article, language);
break;
case 'interview':
+ case 'report':
result.description = j2h.interview(article, language);
break;
case 'novel':
@@ -54,7 +56,7 @@ module.exports = async (ctx) => {
result.description = j2h.uncategorized(article);
}
} catch (error) {
- error.message += ` (at article ${i}: ${article.title})`;
+ error.message += `(at article ${i}: ${article.title})`;
throw error;
}
return result;
diff --git a/lib/routes/touhougarakuta/json2html.js b/lib/routes/touhougarakuta/json2html.js
index 0654522cd..ff99bc449 100644
--- a/lib/routes/touhougarakuta/json2html.js
+++ b/lib/routes/touhougarakuta/json2html.js
@@ -1,17 +1,26 @@
-const indexInterview = (article, language) => ogpImage(article) + article.index.about + index(article, language);
+const indexInterview = (article, language) => {
+ if (article.hasOwnProperty('index')) {
+ return ogpImage(article) + article.ogpSettings.ogp.description + index(article, language);
+ }
+ return ogpImage(article);
+};
const indexComic = (article, language) => ogpImage(article) + article.index.about + authors(article.index.authors) + `` + index(article, language);
const indexNovel = (article, language) => ogpImage(article) + article.index.about + authors(article.index.authors) + `
` + index(article, language);
const interview = (article, language) => {
- const leading = article.interviewContents.leading;
+ if (article.hasOwnProperty('interviewContents')) {
+ const leading = article.interviewContents.leading;
- let result = ogpImage(article) + linkToIndex(article, language) + '