EUS/services/MediaService.ts

22 lines
518 B
TypeScript
Raw Permalink Normal View History

2025-01-06 06:53:13 +00:00
import { Console } from "hsconsole";
import MediaRepo from "../repos/MediaRepo";
export default abstract class MediaService {
public static async GetByHash(hash: string) {
try {
return await MediaRepo.SelectByHash(hash);
} catch (e) {
Console.printError(`EUS server service error:\n${e}`);
throw e;
}
}
public static async GetByTag(tag: string) {
try {
return await MediaRepo.SelectByMediaTag(tag);
} catch (e) {
Console.printError(`EUS server service error:\n${e}`);
throw e;
}
}
}