♻️ refactor: move file to related folder

This commit is contained in:
Rafi Arrafif
2026-01-23 22:29:30 +07:00
parent 4c1f891f12
commit 7d26ca7f7b
8 changed files with 223 additions and 157 deletions

View File

@ -0,0 +1,20 @@
import { Context } from "elysia";
import { mainErrorHandler } from "../../../helpers/error/handler";
import { bulkInsertAnimeService } from "../services/bulkInsertAnime.service";
import { returnWriteResponse } from "../../../helpers/callback/httpResponse";
export const bulkInsertAnimeController = async (
ctx: Context & { body: { mal_id: number } },
) => {
try {
const bulkInsertResult = await bulkInsertAnimeService(ctx.body.mal_id);
return returnWriteResponse(
ctx.set,
201,
"Bulk insert anime operation completed successfully",
bulkInsertResult,
);
} catch (error) {
return mainErrorHandler(ctx.set, error);
}
};