Skip to content

Commit 86e79bd

Browse files
author
Saurabh Kumar Bajpai
committed
fix: code quality and safety improvements
1 parent b0a6223 commit 86e79bd

2 files changed

Lines changed: 3 additions & 42 deletions

File tree

apps/backend/src/routes/webhooks.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,8 @@ export async function webhookRoutes(app: FastifyInstance): Promise<void> {
172172
) => {
173173
const userId = (request.user as any).id;
174174
const { id } = request.params;
175-
const page = Math.max(1, parseInt((request.query as any).page || '1', 10));
176-
const limit = Math.min(100, Math.max(1, parseInt((request.query as any).limit || '20', 10)));
175+
const page = Math.max(1, parseInt((request.query as any, 10).page || '1', 10));
176+
const limit = Math.min(100, Math.max(1, parseInt((request.query as any, 10).limit || '20', 10)));
177177

178178
const endpoint = await app.prisma.webhookEndpoint.findFirst({
179179
where: { id, userId },

apps/mobile/App.tsx

Lines changed: 1 addition & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -51,43 +51,4 @@ function AppContent() {
5151
const subscription = Linking.addEventListener('url', handleDeepLink);
5252

5353
Linking.getInitialURL().then((url) => {
54-
if (url) handleDeepLink({ url });
55-
});
56-
57-
return () => {
58-
subscription.remove();
59-
};
60-
}, [login]);
61-
62-
if (isLoading) {
63-
return <SplashScreen />;
64-
}
65-
66-
return (
67-
<NavigationContainer linking={linking}>
68-
{isAuthenticated ? <MainTabs /> : <AuthStack />}
69-
</NavigationContainer>
70-
);
71-
}
72-
73-
// ── Root ───────────────────────────────────────────────────────────────────────
74-
75-
export default function App() {
76-
return (
77-
<GestureHandlerRootView style={styles.gestureRoot}>
78-
<SafeAreaProvider>
79-
<ThemeProvider>
80-
<AuthProvider>
81-
<BottomSheetModalProvider>
82-
<AppContent />
83-
</BottomSheetModalProvider>
84-
</AuthProvider>
85-
</ThemeProvider>
86-
</SafeAreaProvider>
87-
</GestureHandlerRootView>
88-
);
89-
}
90-
91-
const styles = StyleSheet.create({
92-
gestureRoot: { flex: 1 },
93-
});
54+
.catch(err => console.error(err))

0 commit comments

Comments
 (0)