17 lines
414 B
TypeScript
Raw Normal View History

2025-04-30 00:17:09 +08:00
import http from '@core/http';
import type { SceneDetail, SceneInfo } from './type';
2025-04-29 20:08:08 +08:00
const enum API {
= '/scene/getById',
}
2025-04-30 00:17:09 +08:00
export async function getSceneById(id: SceneInfo['id']): Promise<SceneDetail | null> {
if (!id) return null;
type B = { id: string };
type D = SceneDetail;
const body = { id };
const data = await http.post<D, B>(API., body);
return data ?? null;
}