+5
-1
src/app/api/series/[seriesId]/route.js
+5
-1
src/app/api/series/[seriesId]/route.js
···
+5
-1
src/app/api/works/[workId]/chapters/[chapterId]/route.js
+5
-1
src/app/api/works/[workId]/chapters/[chapterId]/route.js
···
+5
-1
src/app/api/works/[workId]/route.js
+5
-1
src/app/api/works/[workId]/route.js
···
+11
-3
src/app/generator/page.js
+11
-3
src/app/generator/page.js
·········-const resp = match.groups.chapterId ? await fetch(`/api/works/${match.groups.workId}/chapters/${match.groups.chapterId}`) : await fetch(`/api/works/${match.groups.workId}`)setAddr(match.groups.chapterId ? `works/${match.groups.workId}/chapters/${match.groups.chapterId}` : `works/${match.groups.workId}`)···
·········+const domainParam = domain && !(["ao3.org", "archiveofourown.org", "archive.transformativeworks.org"].includes(domain)) ? '' : `?archive=${domain}`+const resp = match.groups.chapterId ? await fetch(`/api/works/${match.groups.workId}/chapters/${match.groups.chapterId}${domainParam}`) : await fetch(`/api/works/${match.groups.workId}${domainParam}`)setAddr(match.groups.chapterId ? `works/${match.groups.workId}/chapters/${match.groups.chapterId}` : `works/${match.groups.workId}`)···
+3
src/app/series/[seriesId]/preview/route.js
+3
src/app/series/[seriesId]/preview/route.js
······
······
+17
-6
src/lib/sanitizeData.js
+17
-6
src/lib/sanitizeData.js
·········const warningsUnique = warnings.reduce((a, b) => { return a.concat(b) }).filter((w, i) => { return i === warnings.indexOf(w) })······const themeData = propsParsed.theme ? themes[propsParsed.theme] : themes[process.env.DEFAULT_THEME]···-const rating = type === 'work' ? await getHighestRating([data]) : await getHighestRating(data.works)-const warning = type === 'work' ? await getHighestWarning([data]) : await getHighestWarning(data.works)···
·········const warningsUnique = warnings.reduce((a, b) => { return a.concat(b) }).filter((w, i) => { return i === warnings.indexOf(w) })······const themeData = propsParsed.theme ? themes[propsParsed.theme] : themes[process.env.DEFAULT_THEME]···+const rating = type === 'work' ? await getHighestRating([data], archive) : await getHighestRating(data.works, archive)+const warning = type === 'work' ? await getHighestWarning([data], archive) : await getHighestWarning(data.works, archive)+const category = type === 'work' ? await getCategory([data], archive) : await getCategory(data.works, archive)···