9 lines
323 B
TypeScript
9 lines
323 B
TypeScript
import { defineEventHandler, readBody } from "h3";
|
|
import { useFixtureIO, type AppSnapshot } from "~/composables/useFixtureIO";
|
|
|
|
export default defineEventHandler(async (event) => {
|
|
const body = (await readBody(event)) as AppSnapshot;
|
|
const { importAll } = useFixtureIO();
|
|
importAll(body);
|
|
return { ok: true };
|
|
});
|