Refactor join service and fix imports
Join service was deleted and its functionality was integrated into the team-accounts API. General rearrangement and renaming of server-related files were made, particularly for billing-related services to ensure consistency. This made it necessary to fix import paths across multiple files.
This commit is contained in:
@@ -20,7 +20,7 @@ import { Trans } from '@kit/ui/trans';
|
||||
|
||||
import billingConfig from '~/config/billing.config';
|
||||
|
||||
import { createPersonalAccountCheckoutSession } from '../server-actions';
|
||||
import { createPersonalAccountCheckoutSession } from '../_lib/server/server-actions';
|
||||
|
||||
const EmbeddedCheckout = dynamic(
|
||||
async () => {
|
||||
|
||||
@@ -5,8 +5,8 @@ import { redirect } from 'next/navigation';
|
||||
import { enhanceAction } from '@kit/next/actions';
|
||||
import { getSupabaseServerActionClient } from '@kit/supabase/server-actions-client';
|
||||
|
||||
import { PersonalAccountCheckoutSchema } from './_lib/schema/personal-account-checkout.schema';
|
||||
import { UserBillingService } from './_lib/server/user-billing.service';
|
||||
import { PersonalAccountCheckoutSchema } from '../schema/personal-account-checkout.schema';
|
||||
import { UserBillingService } from './user-billing.service';
|
||||
|
||||
/**
|
||||
* @name createPersonalAccountCheckoutSession
|
||||
@@ -16,7 +16,7 @@ import { createI18nServerInstance } from '~/lib/i18n/i18n.server';
|
||||
import { withI18n } from '~/lib/i18n/with-i18n';
|
||||
|
||||
import { UserAccountHeader } from '../_components/user-account-header';
|
||||
import { createPersonalAccountBillingPortalSession } from '../billing/server-actions';
|
||||
import { createPersonalAccountBillingPortalSession } from '../billing/_lib/server/server-actions';
|
||||
import { PersonalAccountCheckoutForm } from './_components/personal-account-checkout-form';
|
||||
// user billing imports
|
||||
import { loadPersonalAccountBillingPageData } from './_lib/server/personal-account-billing-page.loader';
|
||||
|
||||
@@ -17,7 +17,7 @@ import { Trans } from '@kit/ui/trans';
|
||||
|
||||
import billingConfig from '~/config/billing.config';
|
||||
|
||||
import { createTeamAccountCheckoutSession } from '../server-actions';
|
||||
import { createTeamAccountCheckoutSession } from '../_lib/server/server-actions';
|
||||
|
||||
const EmbeddedCheckout = dynamic(
|
||||
async () => {
|
||||
|
||||
@@ -10,8 +10,8 @@ import { getSupabaseServerActionClient } from '@kit/supabase/server-actions-clie
|
||||
import {
|
||||
TeamBillingPortalSchema,
|
||||
TeamCheckoutSchema,
|
||||
} from '../_lib/schema/team-billing.schema';
|
||||
import { TeamBillingService } from '../_lib/server/team-billing.service';
|
||||
} from '../schema/team-billing.schema';
|
||||
import { TeamBillingService } from './team-billing.service';
|
||||
|
||||
/**
|
||||
* @name createTeamAccountCheckoutSession
|
||||
@@ -16,7 +16,7 @@ import billingConfig from '~/config/billing.config';
|
||||
import pathsConfig from '~/config/paths.config';
|
||||
import { Database } from '~/lib/database.types';
|
||||
|
||||
import { TeamCheckoutSchema } from '../../_lib/schema/team-billing.schema';
|
||||
import { TeamCheckoutSchema } from '../schema/team-billing.schema';
|
||||
|
||||
export class TeamBillingService {
|
||||
private readonly namespace = 'billing.team-account';
|
||||
@@ -18,8 +18,8 @@ import { withI18n } from '~/lib/i18n/with-i18n';
|
||||
import { AccountLayoutHeader } from '../_components/account-layout-header';
|
||||
import { loadTeamAccountBillingPage } from '../_lib/server/team-account-billing-page.loader';
|
||||
import { loadTeamWorkspace } from '../_lib/server/team-account-workspace.loader';
|
||||
import { createBillingPortalSession } from '../billing/server-actions';
|
||||
import { TeamAccountCheckoutForm } from './_components/team-account-checkout-form';
|
||||
import { createBillingPortalSession } from './_lib/server/server-actions';
|
||||
|
||||
interface Params {
|
||||
params: {
|
||||
|
||||
Reference in New Issue
Block a user