Refactor code structure for improved readability and maintainability

This commit is contained in:
2026-01-11 15:51:22 +07:00
parent 6f8a8de9be
commit 309606565b
46 changed files with 28649 additions and 28522 deletions

View File

@@ -1,23 +1,23 @@
import { getAppById } from '~/data/apps'
import { getAppById } from "~/data/apps";
export default defineEventHandler((event) => {
const id = getRouterParam(event, 'id')
const id = getRouterParam(event, "id");
if (!id) {
throw createError({
statusCode: 400,
message: 'App ID is required',
})
message: "App ID is required",
});
}
const app = getAppById(id)
const app = getAppById(id);
if (!app) {
throw createError({
statusCode: 404,
message: 'App not found',
})
message: "App not found",
});
}
return app
})
return app;
});