Sửa đổi dữ liệu của hệ thống theo ARCHITECTURE.md
This commit is contained in:
Vendored
+14
-13
@@ -10,8 +10,9 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
||||
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
||||
return function (target, key) { decorator(target, key, paramIndex); }
|
||||
};
|
||||
import 'reflect-metadata';
|
||||
import { NestFactory } from '@nestjs/core';
|
||||
import { Module, Controller, Get, Post, Body, Param, Patch, Delete, ParseIntPipe, NotFoundException, BadRequestException, UnauthorizedException, UseGuards } from '@nestjs/common';
|
||||
import { Module, Controller, Get, Post, Body, Param, Patch, Delete, ParseUUIDPipe, NotFoundException, BadRequestException, UnauthorizedException, UseGuards } from '@nestjs/common';
|
||||
import { PrismaService } from './prisma.service.js';
|
||||
import 'dotenv/config';
|
||||
import * as bcrypt from 'bcrypt';
|
||||
@@ -113,7 +114,7 @@ let TourController = class TourController {
|
||||
legs: {
|
||||
take: 1,
|
||||
include: {
|
||||
places: { take: 1 }
|
||||
locations: { take: 1 }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -123,12 +124,12 @@ let TourController = class TourController {
|
||||
const tour = await this.prisma.tour.findUnique({
|
||||
where: { id },
|
||||
include: {
|
||||
members: true,
|
||||
participants: true,
|
||||
photos: true,
|
||||
legs: {
|
||||
orderBy: { sequenceNumber: 'asc' },
|
||||
orderBy: { sequence: 'asc' },
|
||||
include: {
|
||||
places: { orderBy: { sequenceInLeg: 'asc' } },
|
||||
locations: { orderBy: { plannedStart: 'asc' } },
|
||||
expenses: true,
|
||||
},
|
||||
},
|
||||
@@ -147,9 +148,9 @@ __decorate([
|
||||
], TourController.prototype, "getPublicTours", null);
|
||||
__decorate([
|
||||
Get(':id'),
|
||||
__param(0, Param('id', ParseIntPipe)),
|
||||
__param(0, Param('id', ParseUUIDPipe)),
|
||||
__metadata("design:type", Function),
|
||||
__metadata("design:paramtypes", [Number]),
|
||||
__metadata("design:paramtypes", [String]),
|
||||
__metadata("design:returntype", Promise)
|
||||
], TourController.prototype, "getTourDetails", null);
|
||||
TourController = __decorate([
|
||||
@@ -204,24 +205,24 @@ __decorate([
|
||||
], UserController.prototype, "getAllUsers", null);
|
||||
__decorate([
|
||||
Patch(':id'),
|
||||
__param(0, Param('id', ParseIntPipe)),
|
||||
__param(0, Param('id', ParseUUIDPipe)),
|
||||
__param(1, Body()),
|
||||
__metadata("design:type", Function),
|
||||
__metadata("design:paramtypes", [Number, Object]),
|
||||
__metadata("design:paramtypes", [String, Object]),
|
||||
__metadata("design:returntype", Promise)
|
||||
], UserController.prototype, "updateUser", null);
|
||||
__decorate([
|
||||
Delete(':id'),
|
||||
__param(0, Param('id', ParseIntPipe)),
|
||||
__param(0, Param('id', ParseUUIDPipe)),
|
||||
__metadata("design:type", Function),
|
||||
__metadata("design:paramtypes", [Number]),
|
||||
__metadata("design:paramtypes", [String]),
|
||||
__metadata("design:returntype", Promise)
|
||||
], UserController.prototype, "deleteUser", null);
|
||||
__decorate([
|
||||
Post('block/:id'),
|
||||
__param(0, Param('id', ParseIntPipe)),
|
||||
__param(0, Param('id', ParseUUIDPipe)),
|
||||
__metadata("design:type", Function),
|
||||
__metadata("design:paramtypes", [Number]),
|
||||
__metadata("design:paramtypes", [String]),
|
||||
__metadata("design:returntype", Promise)
|
||||
], UserController.prototype, "toggleBlock", null);
|
||||
UserController = __decorate([
|
||||
|
||||
Reference in New Issue
Block a user