add end date and create logo and fix filter
This commit is contained in:
@@ -7,6 +7,7 @@ interface CreateTripInput {
|
||||
mountain: string;
|
||||
location: string;
|
||||
date: Date;
|
||||
endDate?: Date;
|
||||
maxParticipants: number;
|
||||
price: number;
|
||||
organizerId: string;
|
||||
@@ -14,8 +15,8 @@ interface CreateTripInput {
|
||||
}
|
||||
|
||||
export const tripService = {
|
||||
async getOpenTrips() {
|
||||
return tripRepo.findOpen();
|
||||
async getOpenTrips(filters?: { q?: string; from?: string; to?: string }) {
|
||||
return tripRepo.findOpen(filters);
|
||||
},
|
||||
|
||||
async getAllTrips() {
|
||||
@@ -43,6 +44,7 @@ export const tripService = {
|
||||
mountain: input.mountain,
|
||||
location: input.location,
|
||||
date: input.date,
|
||||
endDate: input.endDate,
|
||||
maxParticipants: input.maxParticipants,
|
||||
price: input.price,
|
||||
organizer: { connect: { id: input.organizerId } },
|
||||
|
||||
Reference in New Issue
Block a user