diff --git a/packages/features/auth/src/server/api.ts b/packages/features/auth/src/server/api.ts index 0e6f9ce..ce82491 100644 --- a/packages/features/auth/src/server/api.ts +++ b/packages/features/auth/src/server/api.ts @@ -25,12 +25,11 @@ class AuthApi { throw new Error('User not authenticated'); } - const { data, error } = await this.client.rpc( - 'has_unseen_membership_confirmation', - { + const { data, error } = await this.client + .schema('medreport') + .rpc('has_unseen_membership_confirmation', { p_user_id: user.id, - }, - ); + }); if (error) { throw error; @@ -53,15 +52,17 @@ class AuthApi { throw new Error('User not authenticated'); } - const { error } = await this.client.rpc('update_account', { - p_name: data.firstName, - p_last_name: data.lastName, - p_personal_code: data.personalCode, - p_phone: data.phone || '', - p_city: data.city || '', - p_has_consent_personal_data: data.userConsent, - p_uid: user.id, - }); + const { error } = await this.client + .schema('medreport') + .rpc('update_account', { + p_name: data.firstName, + p_last_name: data.lastName, + p_personal_code: data.personalCode, + p_phone: data.phone || '', + p_city: data.city || '', + p_has_consent_personal_data: data.userConsent, + p_uid: user.id, + }); if (error) { throw error; @@ -86,11 +87,14 @@ class AuthApi { throw new Error('User not authenticated'); } console.log('test', user, data); - const response = await this.client.from('account_params').insert({ - account_id: user.id, - height: data.height, - weight: data.weight, - }); + const response = await this.client + .schema('medreport') + .from('account_params') + .insert({ + account_id: user.id, + height: data.height, + weight: data.weight, + }); if (response.error) { throw response.error; diff --git a/packages/features/notifications/src/components/success-notification.tsx b/packages/features/notifications/src/components/success-notification.tsx index 7c6be5c..17788b2 100644 --- a/packages/features/notifications/src/components/success-notification.tsx +++ b/packages/features/notifications/src/components/success-notification.tsx @@ -11,12 +11,17 @@ export const SuccessNotification = ({ title, titleKey, descriptionKey, + walletProps, buttonProps, }: { showLogo?: boolean; title?: string; titleKey?: string; descriptionKey?: string; + walletProps?: { + amount: string; + expiredAt: string; + }; buttonProps?: { buttonTitleKey: string; href: string; @@ -38,6 +43,16 @@ export const SuccessNotification = ({

+ {walletProps && ( +
+ +

+ +
+ )} {buttonProps && (