Cài đặt tính năng hiển thị chi phí
This commit is contained in:
Vendored
+4
-1
@@ -159,12 +159,15 @@ let TourController = class TourController {
|
||||
this.prisma = prisma;
|
||||
}
|
||||
async createTour(body, req) {
|
||||
const { title, startDate, endDate } = body;
|
||||
const { title, startDate, endDate, adultCount, childCount, childDiscount } = body;
|
||||
return this.prisma.tour.create({
|
||||
data: {
|
||||
title,
|
||||
startDate: startDate ? new Date(startDate) : null,
|
||||
endDate: endDate ? new Date(endDate) : null,
|
||||
adultCount: adultCount || 1,
|
||||
childCount: childCount || 0,
|
||||
childDiscount: childDiscount || 0,
|
||||
createdById: req.user.id,
|
||||
participants: {
|
||||
create: {
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user