Skip to content

Commit

Permalink
feat: add ranking module and update the app module
Browse files Browse the repository at this point in the history
  • Loading branch information
freitagfelipe committed Nov 30, 2023
1 parent 5b1dd5c commit 1d149b5
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { AskModule } from "./ask/ask.module";
import { StaticModule } from "./assets/assets.module";
import { CommentModule } from "./comment/comment.module";
import { ScoreModule } from "./score/score.module";
import { RankingModule } from "./ranking/ranking.module";

@Module({
imports: [
Expand Down Expand Up @@ -45,6 +46,7 @@ import { ScoreModule } from "./score/score.module";
TestModule,
CommentModule,
ScoreModule,
RankingModule,
],
controllers: [],
providers: [],
Expand Down
18 changes: 18 additions & 0 deletions src/ranking/ranking.module.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { Module } from "@nestjs/common";
import { TypeOrmModule } from "@nestjs/typeorm";
import { User } from "src/user/entities/user.entity";
import { RankingController } from "./ranking.controller";
import { JwtService } from "@nestjs/jwt";
import { AuthService } from "src/auth/auth.service";
import { RankingService } from "./ranking.service";
import { UserService } from "src/user/user.service";

@Module({
imports: [
TypeOrmModule.forFeature([User]),
],
controllers: [RankingController],
providers: [JwtService, AuthService, RankingService, UserService]
})

export class RankingModule {}
4 changes: 4 additions & 0 deletions src/user/entities/user.entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ export class User {
@Column({ unique: true })
email: string;

@Exclude()
@Column({ nullable: false, generated: "increment" })
id: number;

@Exclude()
@Column({ nullable: false })
hashPassword: string;
Expand Down

0 comments on commit 1d149b5

Please sign in to comment.