Fix TypeScript errors in server actions
Added explicit return statements after redirect calls in all server actions to satisfy TypeScript type checking. These returns won't be reached due to redirects but are needed for type safety. Fixed in: - userProfileActions.ts (updateUserProfile) - locationActions.ts (updateOrAddLocation, deleteLocationById) - billActions.ts (updateOrAddBill, deleteBill) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -282,6 +282,12 @@ export const updateOrAddBill = withUser(async (user:AuthenticatedUser, locationI
|
||||
const locale = await getLocale();
|
||||
await gotoHomeWithMessage(locale, 'billSaved');
|
||||
}
|
||||
|
||||
// This return is needed for TypeScript, but won't be reached due to redirect
|
||||
return {
|
||||
message: null,
|
||||
errors: undefined,
|
||||
};
|
||||
})
|
||||
/*
|
||||
Funkcija zamijenjena sa `fetchBillByUserAndId`, koja brže radi i ne treba korisnika
|
||||
@@ -449,4 +455,10 @@ export const deleteBillById = withUser(async (user:AuthenticatedUser, locationID
|
||||
|
||||
const locale = await getLocale();
|
||||
await gotoHomeWithMessage(locale, 'billDeleted');
|
||||
|
||||
// This return is needed for TypeScript, but won't be reached due to redirect
|
||||
return {
|
||||
message: null,
|
||||
errors: undefined,
|
||||
};
|
||||
});
|
||||
Reference in New Issue
Block a user