generated from Medici-Mansion/basic-template
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feature/#33-SNP-64' into develop
- Loading branch information
Showing
9 changed files
with
113 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { ApiProperty } from '@nestjs/swagger'; | ||
import { IsString } from 'class-validator'; | ||
|
||
export class ChangeNicknameDTO { | ||
@ApiProperty({ description: '번경할 닉네임', default: '츄츄' }) | ||
@IsString() | ||
nickname: string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
import { Module } from '@nestjs/common'; | ||
import { UserController } from './user.controller'; | ||
import { UserService } from './user.service'; | ||
import { UserRepository } from './user.repository'; | ||
|
||
@Module({ | ||
imports: [], | ||
controllers: [UserController], | ||
providers: [UserService], | ||
providers: [UserService, UserRepository], | ||
exports: [UserService], | ||
}) | ||
export class UserModule {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { DataSource, DeepPartial, Repository } from 'typeorm'; | ||
import { User } from './entities/user.entity'; | ||
import { InjectDataSource } from '@nestjs/typeorm'; | ||
|
||
export class UserRepository extends Repository<User> { | ||
constructor(@InjectDataSource() private readonly dataSource: DataSource) { | ||
super(User, dataSource.manager); | ||
} | ||
|
||
async updateAndReturning(userId: number, userLike: DeepPartial<User>) { | ||
return await this.update(userId, userLike); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters