Skip to content

Commit

Permalink
Merge pull request #12 from erik1110/feature/api
Browse files Browse the repository at this point in the history
[style] update directory
  • Loading branch information
erik1110 committed Jan 16, 2024
2 parents fa65fe6 + a126940 commit 78976e7
Show file tree
Hide file tree
Showing 9 changed files with 43 additions and 6 deletions.
37 changes: 37 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,43 @@ If you find this project appealing and decide to give it a GitHub star ⭐️, I

<img src="./image/Swagger.png">

## Directory Structure

```txt
hotel-reservation-backend
└── src/
├── auth/
│ ├── decorators/
│ ├── guards/
│ ├── interfaces/
│ ├── strategies/
│ ├── auth.modules.ts
│ └── auth.service.ts
├── common/
│ ├── decorators/
│ └── dto/
├── features/
│ ├── culinary/
│ ├── news/
│ ├── order/
│ ├── room/
│ └── user/
│ ├── dto
│ ├── interfaces
│ ├── schemas
│ ├── user.controller.ts
│ ├── user.module.ts
│ └── user.service.ts
├── utils/
│ ├── appError.ts
│ ├── errorHandler.ts
│ ├── successHandler.ts
│ └── zipcodes.ts
├── app.controller.ts
├── app.module.ts
└── main.ts
```

## Description

[Nest](https://github.com/nestjs/nest) framework TypeScript starter repository.
Expand Down
2 changes: 1 addition & 1 deletion src/features/culinary/culinary.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import {
ApiTags,
} from '@nestjs/swagger';
import { RolesGuard } from 'src/auth/guards/roles.guard';
import { ApiErrorDecorator } from 'src/common/decorator/error/error.decorator';
import { ApiErrorDecorator } from 'src/common/decorators/error/error.decorator';
import { CulinaryService } from './culinary.service';
import { Roles } from 'src/auth/decorators/roles.decorator';
import {
Expand Down
2 changes: 1 addition & 1 deletion src/features/news/news.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {
ApiOperation,
ApiTags,
} from '@nestjs/swagger';
import { ApiErrorDecorator } from 'src/common/decorator/error/error.decorator';
import { ApiErrorDecorator } from 'src/common/decorators/error/error.decorator';
import { NewsService } from './news.service';
import {
CreateNewsDto,
Expand Down
2 changes: 1 addition & 1 deletion src/features/order/dto/order.dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Transform, Type } from 'class-transformer';
import { IsDate, IsNotEmpty, Matches, ValidateNested, ValidationOptions, registerDecorator } from 'class-validator';
import { Schema } from 'mongoose';
import { UserDto } from './user.dto';
import { IsBefore, IsNotBeforeToday } from 'src/common/decorator/validation/dto.decorator';
import { IsBefore, IsNotBeforeToday } from 'src/common/decorators/validation/dto.decorator';

export class CreateOrderDto {
@ApiProperty({
Expand Down
2 changes: 1 addition & 1 deletion src/features/order/order.controller.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Body, Controller, Delete, Get, HttpCode, HttpStatus, Param, Post, Put, Req, UseGuards } from '@nestjs/common';
import { ApiBearerAuth, ApiOkResponse, ApiOperation, ApiTags } from '@nestjs/swagger';
import { RolesGuard } from 'src/auth/guards/roles.guard';
import { ApiErrorDecorator } from 'src/common/decorator/error/error.decorator';
import { ApiErrorDecorator } from 'src/common/decorators/error/error.decorator';
import { OrderService } from './order.service';
import { Roles } from 'src/auth/decorators/roles.decorator';
import { CreateOrderDto, CreateOrderSuccessDto, DeleteOrderSuccessDto, GetOneOrderSuccessDto, GetOrderSuccessDto, UpdateOrderSuccessDto } from './dto/order.dto';
Expand Down
2 changes: 1 addition & 1 deletion src/features/room/room.controller.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Body, Controller, Delete, Get, HttpCode, HttpStatus, Param, Post, Put, Req, UseGuards } from '@nestjs/common';
import { ApiBearerAuth, ApiOkResponse, ApiOperation, ApiTags } from '@nestjs/swagger';
import { RolesGuard } from 'src/auth/guards/roles.guard';
import { ApiErrorDecorator } from 'src/common/decorator/error/error.decorator';
import { ApiErrorDecorator } from 'src/common/decorators/error/error.decorator';
import { RoomService } from './room.service';
import { Roles } from 'src/auth/decorators/roles.decorator';
import { CreateRoomDto, CreateRoomSuccessDto, DeleteRoomSuccessDto, GetOneRoomSuccessDto, GetRoomSuccessDto, UpdateRoomSuccessDto } from './dto/room.dto';
Expand Down
2 changes: 1 addition & 1 deletion src/features/user/user.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import {
ApiOperation,
} from '@nestjs/swagger';
import { EmailDto, GenerateEmailSuccessDto } from './dto/email.dto';
import { ApiErrorDecorator } from 'src/common/decorator/error/error.decorator';
import { ApiErrorDecorator } from 'src/common/decorators/error/error.decorator';
import { UpdateUserDto, UpdateUserSuccessDto } from './dto/update-user.dto';

@ApiTags('User - 使用者')
Expand Down

0 comments on commit 78976e7

Please sign in to comment.