|
|
@@ -44,19 +44,18 @@ import { useEntityManager } from '~/composables/data/useEntityManager'
|
|
|
import { usePageStore } from '~/stores/page'
|
|
|
import { TYPE_ALERT } from '~/types/enum/enums'
|
|
|
import { useRefreshProfile } from '~/composables/data/useRefreshProfile'
|
|
|
+import { useRouteUtils } from '~/composables/utils/useRouteUtils'
|
|
|
|
|
|
const { em } = useEntityManager()
|
|
|
const { fetch } = useEntityFetch()
|
|
|
|
|
|
const router = useRouter()
|
|
|
-const route = useRoute()
|
|
|
|
|
|
const { refreshProfile } = useRefreshProfile()
|
|
|
|
|
|
-if (!route.params.id || /\d+/.test(route.params.id as string)) {
|
|
|
- throw new Error('no id found')
|
|
|
-}
|
|
|
-const id: number = parseInt(route.params.id as string)
|
|
|
+const { getIdFromRoute } = useRouteUtils()
|
|
|
+
|
|
|
+const id = getIdFromRoute()
|
|
|
|
|
|
const { data: subdomain, pending } = fetch(Subdomain, id)
|
|
|
|