Refactor HousesPage and HouseManagement components: Introduce TypeScript types for house and invitation data structures to enhance type safety. Update data serialization logic for improved clarity and maintainability. Refactor UI components for better readability and consistency, including adjustments to conditional rendering and styling in HouseManagement. Optimize fetch logic in HousesSection with useCallback for performance improvements.
All checks were successful
Deploy with Docker Compose / deploy (push) Successful in 4m25s
All checks were successful
Deploy with Docker Compose / deploy (push) Successful in 4m25s
This commit is contained in:
@@ -346,8 +346,13 @@ export class ChallengeService {
|
||||
where: { id: challengeId },
|
||||
data: updateData,
|
||||
});
|
||||
} catch (error: any) {
|
||||
if (error?.code === "P2025") {
|
||||
} catch (error: unknown) {
|
||||
if (
|
||||
error &&
|
||||
typeof error === "object" &&
|
||||
"code" in error &&
|
||||
error.code === "P2025"
|
||||
) {
|
||||
// Record not found
|
||||
throw new NotFoundError("Défi");
|
||||
}
|
||||
@@ -431,8 +436,13 @@ export class ChallengeService {
|
||||
await prisma.challenge.delete({
|
||||
where: { id: challengeId },
|
||||
});
|
||||
} catch (error: any) {
|
||||
if (error?.code === "P2025") {
|
||||
} catch (error: unknown) {
|
||||
if (
|
||||
error &&
|
||||
typeof error === "object" &&
|
||||
"code" in error &&
|
||||
error.code === "P2025"
|
||||
) {
|
||||
// Record not found
|
||||
throw new NotFoundError("Défi");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user