trust roadmap
This commit is contained in:
@@ -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);
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user