Refactor API routes and component logic: Remove unused event and user management routes, streamline feedback handling in components, and enhance state management with transitions for improved user experience. Update service layer methods for better organization and maintainability across the application.
All checks were successful
Deploy with Docker Compose / deploy (push) Successful in 2m38s
All checks were successful
Deploy with Docker Compose / deploy (push) Successful in 2m38s
This commit is contained in:
@@ -81,9 +81,6 @@ export class EventRegistrationService {
|
||||
where: {
|
||||
userId,
|
||||
},
|
||||
select: {
|
||||
eventId: true,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { prisma } from "../database";
|
||||
import type {
|
||||
Event,
|
||||
EventType,
|
||||
Prisma,
|
||||
} from "@/prisma/generated/prisma/client";
|
||||
import { EventType } from "@/prisma/generated/prisma/client";
|
||||
import { ValidationError, NotFoundError } from "../errors";
|
||||
import { calculateEventStatus } from "@/lib/eventStatus";
|
||||
|
||||
|
||||
@@ -225,10 +225,11 @@ export class UserStatsService {
|
||||
selectFields
|
||||
);
|
||||
} else {
|
||||
updatedUser = await userService.getUserById(id, selectFields);
|
||||
if (!updatedUser) {
|
||||
const user = await userService.getUserById(id, selectFields);
|
||||
if (!user) {
|
||||
throw new NotFoundError("Utilisateur");
|
||||
}
|
||||
updatedUser = user;
|
||||
}
|
||||
|
||||
// Mettre à jour username/avatar si nécessaire
|
||||
|
||||
@@ -3,7 +3,6 @@ import bcrypt from "bcryptjs";
|
||||
import type {
|
||||
User,
|
||||
CharacterClass,
|
||||
Role,
|
||||
Prisma,
|
||||
} from "@/prisma/generated/prisma/client";
|
||||
import { ValidationError, NotFoundError, ConflictError } from "../errors";
|
||||
|
||||
Reference in New Issue
Block a user