-
Notifications
You must be signed in to change notification settings - Fork 0
fix: resolve staging deploy failures in migration and frontend build #70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -79,10 +79,11 @@ export default function WidgetSettingsPage() { | |
| const res = await getBusinessProfile(); | ||
| if (res.status === 'success' && res.data) { | ||
| setBusiness(res.data); | ||
| const d = res.data as unknown as Record<string, number | undefined>; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟢 Introducing a temporary variable |
||
| setLimits({ | ||
| allocated_messages_per_session: (res.data as Record<string, unknown>).allocated_messages_per_session, | ||
| allocated_daily_sessions: (res.data as Record<string, unknown>).allocated_daily_sessions, | ||
| allocated_whitelisted_domains: (res.data as Record<string, unknown>).allocated_whitelisted_domains, | ||
| allocated_messages_per_session: d.allocated_messages_per_session, | ||
| allocated_daily_sessions: d.allocated_daily_sessions, | ||
| allocated_whitelisted_domains: d.allocated_whitelisted_domains, | ||
| }); | ||
|
Comment on lines
+82
to
87
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The double type assertion ( |
||
| } | ||
| } catch (e) { console.error(e); } | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🟢 This is a good improvement to make the migration more robust by checking if tables exist before attempting to drop them. This prevents potential errors in environments where these tables might not be present.