chore: migrate to KT financial system

This commit is contained in:
woshiqp465
2025-11-04 16:06:44 +08:00
parent 2c0505b73d
commit f4cd0a5f22
289 changed files with 7362 additions and 41458 deletions

View File

@@ -0,0 +1,22 @@
import { getRouterParam } from 'h3';
import { getMediaMessageById } from '~/utils/media-repository';
import { useResponseError, useResponseSuccess } from '~/utils/response';
export default defineEventHandler((event) => {
const idParam = getRouterParam(event, 'id');
const id = idParam ? Number.parseInt(idParam, 10) : NaN;
if (!Number.isInteger(id)) {
return useResponseError('媒体ID不合法', -1);
}
const media = getMediaMessageById(id);
if (!media) {
return useResponseError('未找到对应的媒体记录', -1);
}
return useResponseSuccess(media);
});