(
@Body() postData: { title: string; content?: string; authorEmail: string },
)
| 64 | |
| 65 | @Post('post') |
| 66 | async createDraft( |
| 67 | @Body() postData: { title: string; content?: string; authorEmail: string }, |
| 68 | ): Promise<PostModel> { |
| 69 | const { title, content, authorEmail } = postData; |
| 70 | return this.prismaService.extendedPrismaClient().post.create({ |
| 71 | data: { |
| 72 | title, |
| 73 | content, |
| 74 | author: { |
| 75 | connect: { email: authorEmail }, |
| 76 | }, |
| 77 | }, |
| 78 | }); |
| 79 | } |
| 80 | |
| 81 | @Post('signup') |
| 82 | async signupUser( |
no test coverage detected