初始化:职引项目 v1.0
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
import { Controller, Post, Get, Delete, Param, Body } from '@nestjs/common'
|
||||
import { ResumeService } from './resume.service'
|
||||
import { CurrentUser } from '../../common/decorators/current-user.decorator'
|
||||
|
||||
@Controller('resume')
|
||||
export class ResumeController {
|
||||
constructor(private resumeService: ResumeService) {}
|
||||
|
||||
@Post('create')
|
||||
async create(
|
||||
@CurrentUser('userId') userId: string,
|
||||
@Body('title') title: string,
|
||||
@Body('content') content: string,
|
||||
@Body('targetPosition') targetPosition?: string,
|
||||
) {
|
||||
return this.resumeService.create(userId, title, content, targetPosition)
|
||||
}
|
||||
|
||||
@Get('list')
|
||||
async list(@CurrentUser('userId') userId: string) {
|
||||
return this.resumeService.list(userId)
|
||||
}
|
||||
|
||||
@Get(':id')
|
||||
async getDetail(@Param('id') id: string, @CurrentUser('userId') userId: string) {
|
||||
return this.resumeService.getDetail(id, userId)
|
||||
}
|
||||
|
||||
@Delete(':id')
|
||||
async delete(@Param('id') id: string, @CurrentUser('userId') userId: string) {
|
||||
return this.resumeService.delete(id, userId)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user