translations, remove random empty lines, refactor
This commit is contained in:
@@ -11,6 +11,7 @@ import { getSupabaseServerClient } from '@kit/supabase/server-client';
|
||||
|
||||
import { EnrichedCartItem } from '../../app/home/(user)/_components/cart/types';
|
||||
import { loadCurrentUserAccount } from '../../app/home/(user)/_lib/server/load-user-account';
|
||||
import { createCartEntriesLog } from './audit/cartEntries';
|
||||
import { handleDeleteCartItem } from './medusaCart.service';
|
||||
|
||||
type Locations = Tables<{ schema: 'medreport' }, 'connected_online_locations'>;
|
||||
@@ -305,29 +306,21 @@ export async function updateReservationTime(
|
||||
.throwOnError();
|
||||
|
||||
logger.info(`Successfully updated reservation ${reservationData}`);
|
||||
await supabase
|
||||
.schema('audit')
|
||||
.from('cart_entries')
|
||||
.insert({
|
||||
operation: 'CHANGE_RESERVATION',
|
||||
account_id: account.id,
|
||||
cart_id: cartId,
|
||||
changed_by: user.id,
|
||||
comment: `${reservationData}`,
|
||||
});
|
||||
await createCartEntriesLog({
|
||||
operation: 'CHANGE_RESERVATION',
|
||||
accountId: account.id,
|
||||
cartId: cartId,
|
||||
comment: `${reservationData}`,
|
||||
});
|
||||
revalidatePath('/home/cart', 'layout');
|
||||
} catch (e) {
|
||||
logger.error(`Failed to update reservation ${reservationData}`);
|
||||
await supabase
|
||||
.schema('audit')
|
||||
.from('cart_entries')
|
||||
.insert({
|
||||
operation: 'CHANGE_RESERVATION',
|
||||
account_id: account.id,
|
||||
cart_id: cartId,
|
||||
changed_by: user.id,
|
||||
comment: `${e}`,
|
||||
});
|
||||
await createCartEntriesLog({
|
||||
operation: 'CHANGE_RESERVATION',
|
||||
accountId: account.id,
|
||||
cartId: cartId,
|
||||
comment: `${e}`,
|
||||
});
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user