trust roadmap

This commit is contained in:
arifal
2026-05-09 00:55:40 +07:00
parent 5e0232d909
commit 54cd984a7e
14 changed files with 628 additions and 281 deletions
+11
View File
@@ -3,6 +3,10 @@ import { participantRepo } from "@/server/repositories/participant.repo";
import { reviewRepo } from "@/server/repositories/review.repo";
import { isPastTripLastDayForReview } from "@/lib/trip-dates";
export type OrganizerReviewItem = Awaited<
ReturnType<typeof reviewRepo.findByOrganizer>
>[number];
export const reviewService = {
async upsertReview(
tripId: string,
@@ -41,4 +45,11 @@ export const reviewService = {
comment: input.comment ?? null,
});
},
async getReviewsByOrganizer(
organizerId: string,
limit?: number
): Promise<OrganizerReviewItem[]> {
return reviewRepo.findByOrganizer(organizerId, limit);
},
};