Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feat] Dashboard api endpoint 작성 #129

Merged
merged 4 commits into from
Nov 10, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion apps/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,15 @@
"test:e2e": "jest --config ./test/jest-e2e.json"
},
"dependencies": {
"@nestjs/common": "^10.0.0",
"@nestjs/common": "^10.4.6",
"@nestjs/config": "^3.3.0",
"@nestjs/core": "^10.0.0",
"@nestjs/platform-express": "^10.0.0",
"@nestjs/swagger": "^8.0.1",
"@nestjs/typeorm": "^10.0.2",
"@repo/shared": "workspace:*",
"@repo/types": "workspace:*",
"eslint-import-resolver-typescript": "^3.6.3",
"mysql2": "^3.11.3",
"reflect-metadata": "^0.2.0",
"rxjs": "^7.8.1",
Expand Down
2 changes: 2 additions & 0 deletions apps/api/src/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { TypeOrmConfigService } from 'config/typeorm.config';

import { AppService } from './app.service';
import { AuthModule } from './auth/auth.module';
import { DashboardModule } from './dashboard/dashboard.module';
import { StreamModule } from './stream/stream.module';
import { TicleModule } from './ticle/ticle.module';
import { UserModule } from './user/user.module';
Expand All @@ -25,6 +26,7 @@ import { UserModule } from './user/user.module';
imports: [ConfigModule],
useClass: TypeOrmConfigService,
}),
DashboardModule,
],
controllers: [AppController],
providers: [AppService],
Expand Down
21 changes: 21 additions & 0 deletions apps/api/src/dashboard/dashboard.controller.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { Controller, Get, Param, Post } from '@nestjs/common';

@Controller('dashboard')
export class DashboardController {
constructor() {}

@Get('created')
getCreatedTicleList() {}

@Get('applied')
getAppliedTicleList() {}

@Get('created/:ticleId/participants')
getParticipants(@Param('ticleId') ticleId: number) {}
Copy link
Collaborator

@simeunseo simeunseo Nov 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P3
다른 곳에서는 'apply'라는 단어를 사용하고있는 것을 고려했을 때
여기서도 participants가 아닌 applicants를 사용하는 건 어떨까요?
실제로 참여자라기보단 신청자의 의미가 들어가야하니 의미상으로도 더 적절해보여서요!

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

맞아요 제가 그냥 참여자라고 생각해서 그렇게 썼는데 db 테이블도 applicant로 되어있어서 그게 맞는 것 같습니다 ㅎㅎ 바로 수정완료했어요~!

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pnpm install로 바로 해결 완료 했습니다 ㅎㅎ 갑작스런 에러여서 놀랐네여.. 감사합니다 !


@Post('created/:ticleId/start')
startTicle(@Param('ticleId') ticleId: number) {}

@Post('applied/:ticleId/join')
joinTicle(@Param('ticleId') ticleId: number) {}
}
4 changes: 4 additions & 0 deletions apps/api/src/dashboard/dashboard.module.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import { Module } from '@nestjs/common';

@Module({})
export class DashboardModule {}
Loading