add end date and create logo and fix filter
This commit is contained in:
@@ -18,6 +18,7 @@ export async function createTripAction(formData: FormData) {
|
||||
mountain: formData.get("mountain") as string,
|
||||
location: formData.get("location") as string,
|
||||
date: formData.get("date") as string,
|
||||
endDate: (formData.get("endDate") as string) || undefined,
|
||||
maxParticipants: formData.get("maxParticipants") as string,
|
||||
price: formData.get("price") as string,
|
||||
};
|
||||
@@ -37,6 +38,7 @@ export async function createTripAction(formData: FormData) {
|
||||
const trip = await tripService.createTrip({
|
||||
...result.data,
|
||||
date: new Date(result.data.date),
|
||||
endDate: result.data.endDate ? new Date(result.data.endDate) : undefined,
|
||||
organizerId: session.user.id,
|
||||
imageUrls: imageUrls.length > 0 ? imageUrls : undefined,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user