EUS/services/MediaService.ts
2025-01-06 06:53:13 +00:00

22 lines
No EOL
518 B
TypeScript

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;
}
}
}