MED-194: fix order view for single analysis
MED-194: fix order view for single analysis
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { SupabaseClient } from '@supabase/supabase-js';
|
||||
|
||||
import { getLogger } from '@kit/shared/logger';
|
||||
import type { UuringuVastus } from '@kit/shared/types/medipost-analysis';
|
||||
import { toArray } from '@kit/shared/utils';
|
||||
import { Database } from '@kit/supabase/database';
|
||||
@@ -463,13 +464,19 @@ class UserAnalysesApi {
|
||||
medusaOrderId?: string;
|
||||
orderStatus: AnalysisOrderStatus;
|
||||
}) {
|
||||
const logger = await getLogger();
|
||||
const orderIdParam = orderId;
|
||||
const medusaOrderIdParam = medusaOrderId;
|
||||
const ctx = {
|
||||
action: 'update-analysis-order-status',
|
||||
orderId,
|
||||
medusaOrderId,
|
||||
orderStatus,
|
||||
};
|
||||
|
||||
console.info(
|
||||
`Updating order id=${orderId} medusaOrderId=${medusaOrderId} status=${orderStatus}`,
|
||||
);
|
||||
logger.info(ctx, 'Updating order');
|
||||
if (!orderIdParam && !medusaOrderIdParam) {
|
||||
logger.error(ctx, 'Missing orderId or medusaOrderId');
|
||||
throw new Error('Either orderId or medusaOrderId must be provided');
|
||||
}
|
||||
await this.client
|
||||
|
||||
Reference in New Issue
Block a user