feat(MED-87): update status on results
This commit is contained in:
@@ -45,7 +45,8 @@ export async function updateOrder({
|
||||
orderId: number;
|
||||
orderStatus: Tables<{ schema: 'medreport' }, 'analysis_orders'>['status'];
|
||||
}) {
|
||||
const { error } = await getSupabaseServerClient()
|
||||
console.info(`Updating order id=${orderId} status=${orderStatus}`);
|
||||
await getSupabaseServerAdminClient()
|
||||
.schema('medreport')
|
||||
.from('analysis_orders')
|
||||
.update({
|
||||
@@ -53,9 +54,6 @@ export async function updateOrder({
|
||||
})
|
||||
.eq('id', orderId)
|
||||
.throwOnError();
|
||||
if (error) {
|
||||
throw new Error(`Failed to update order, message=${error}, data=${JSON.stringify(error)}`);
|
||||
}
|
||||
}
|
||||
|
||||
export async function getOrder({
|
||||
|
||||
Reference in New Issue
Block a user