chore(release): 0.4.0

This commit is contained in:
2026-05-05 15:00:14 +07:00
parent 5948d0e2a0
commit 9dfd0295d3
22 changed files with 239 additions and 89 deletions
+5 -1
View File
@@ -1,6 +1,7 @@
import { userRepo } from "@/server/repositories/user.repo";
import { tripRepo } from "@/server/repositories/trip.repo";
import { participantRepo } from "@/server/repositories/participant.repo";
import { organizerRepo } from "@/server/repositories/organizer.repo";
import { isPastTripLastDayForReview } from "@/lib/trip-dates";
export const profileService = {
@@ -10,10 +11,12 @@ export const profileService = {
throw new Error("Pengguna tidak ditemukan");
}
const [organizedTrips, participations] = await Promise.all([
const [organizedTrips, participations, verification] = await Promise.all([
tripRepo.findByOrganizerId(userId),
participantRepo.findWithTripForProfile(userId),
organizerRepo.findByUserId(userId),
]);
const isVerifiedOrganizer = verification?.status === "APPROVED";
const activeJoined = participations
.filter((p) => p.status !== "CANCELLED")
@@ -42,6 +45,7 @@ export const profileService = {
return {
user,
isVerifiedOrganizer,
organizedTrips,
activeJoined,
cancelledJoined,