diff --git a/components/Releases.vue b/components/Releases.vue new file mode 100644 index 0000000..5e69208 --- /dev/null +++ b/components/Releases.vue @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/pages/apps.vue b/pages/apps.vue index a388a1c..01f3a1c 100644 --- a/pages/apps.vue +++ b/pages/apps.vue @@ -13,7 +13,9 @@ const orgsStore = useOrgsStore() const onRowSelect = (event: any) => { const appName = event.data.name - navigateTo(`/orgs/${orgNameParam}/apps/${appName}`) + console.log(event.data) + const orgName = event.data.Organization.name + navigateTo(`/orgs/${orgName}/apps/${appName}`) }; const addOrgVisible = ref(false) @@ -121,17 +123,13 @@ const search = (e: any) => { selectionMode="single"> diff --git a/pages/orgs/[orgName]/apps/[appId].vue b/pages/orgs/[orgName]/apps/[appId].vue index 91d2751..18dd6b6 100644 --- a/pages/orgs/[orgName]/apps/[appId].vue +++ b/pages/orgs/[orgName]/apps/[appId].vue @@ -1,8 +1,58 @@ \ No newline at end of file diff --git a/server/api/detail-app.get.ts b/server/api/detail-app.get.ts new file mode 100644 index 0000000..54b5c3e --- /dev/null +++ b/server/api/detail-app.get.ts @@ -0,0 +1,17 @@ +export default defineEventHandler(async (event) => { + const userId = event.context.auth.userId + const prisma = event.context.prisma + const { appName, orgName } = getQuery(event) + const app = await prisma.apps.findFirstOrThrow({ + include: { + Organization: true, + }, + where: { + name: appName!.toString(), + Organization: { + name: orgName!.toString(), + }, + }, + }) + return app +})