♻️ refactor: align update-thumbnail and bulk-insert-video with latest Elysia standards

This commit is contained in:
2026-03-08 07:31:38 +07:00
parent 5a4e4d04a4
commit 9f47f8f298
6 changed files with 124 additions and 66 deletions

View File

@ -1,12 +1,11 @@
import { SystemAccountId } from "../../../../config/account/system";
import { ErrorForwarder } from "../../../../helpers/error/instances/forwarder";
import { BulkInsertVideoBodyRequest } from "../../controllers/bulkInsertVideo.controller";
import { findEpisodeWithMediaIdRepository } from "../../repositories/findEpisodeWithMediaId.repository";
import { bulkInsertVideoRepository } from "../../repositories/bulkInsertVideo.repository";
import { Static } from "elysia";
import { bulkInsertVideoSchema } from "../../schemas/bulkInsertVideo.schema";
export const bulkInsertVideoService = async (
body: BulkInsertVideoBodyRequest,
) => {
export const bulkInsertVideoService = async (body: Static<typeof bulkInsertVideoSchema.body>) => {
try {
const insertedVideos: string[] = [];
for (const episodeData of body.data) {