novel extensions dont appear on manga entry and viceversa
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
import { FastifyReply, FastifyRequest } from 'fastify';
|
||||
import { getExtension, getExtensionsList, getGalleryExtensionsMap, getBookExtensionsMap, getAnimeExtensionsMap, saveExtensionFile, deleteExtensionFile } from '../../shared/extensions';
|
||||
import { getExtension, getExtensionsList, getGalleryExtensionsMap, getBookExtensionsMap, getMangaExtensionsMap, getNovelExtensionsMap, getAnimeExtensionsMap, saveExtensionFile, deleteExtensionFile } from '../../shared/extensions';
|
||||
import { ExtensionNameRequest } from '../types';
|
||||
import path from 'path';
|
||||
import fs from 'fs/promises';
|
||||
|
||||
const TYPE_MAP: Record<string, string> = {
|
||||
'anime-board': 'anime',
|
||||
@@ -69,6 +67,16 @@ export async function getBookExtensions(req: FastifyRequest, reply: FastifyReply
|
||||
return { extensions: Array.from(bookExtensions.keys()) };
|
||||
}
|
||||
|
||||
export async function getMangaExtensions(req: FastifyRequest, reply: FastifyReply) {
|
||||
const bookExtensions = getMangaExtensionsMap();
|
||||
return { extensions: Array.from(bookExtensions.keys()) };
|
||||
}
|
||||
|
||||
export async function getNovelExtensions(req: FastifyRequest, reply: FastifyReply) {
|
||||
const bookExtensions = getNovelExtensionsMap();
|
||||
return { extensions: Array.from(bookExtensions.keys()) };
|
||||
}
|
||||
|
||||
export async function getGalleryExtensions(req: FastifyRequest, reply: FastifyReply) {
|
||||
const galleryExtensions = getGalleryExtensionsMap();
|
||||
return { extensions: Array.from(galleryExtensions.keys()) };
|
||||
|
||||
Reference in New Issue
Block a user