File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -180,12 +180,12 @@ export class PostService {
180180 private dbConnection : Client ,
181181 ) {}
182182
183- public async findAll(): Promise <User []> {
183+ public async findAll(): Promise <Post []> {
184184 const users = await this .dbConnection .query (' SELECT * FROM posts' );
185185 return users .rows ;
186186 }
187187
188- public async create(createPostDto : CreatePostDto ): Promise <User > {
188+ public async create(createPostDto : CreatePostDto ): Promise <Post [] > {
189189 try {
190190 const user = await this .dbConnection .query (
191191 ' INSERT INTO posts (title, description) VALUES ($1, $2) RETURNING *' ,
@@ -219,7 +219,7 @@ export class UsersService {
219219 return users .rows ;
220220 }
221221
222- public async create(createUserDto : CreateUserDto ): Promise <User > {
222+ public async create(createUserDto : CreateUserDto ): Promise <User [] > {
223223 try {
224224 const user = await this .dbConnection .query (
225225 ' INSERT INTO users (firstName, lastName) VALUES ($1, $2) RETURNING *' ,
You can’t perform that action at this time.
0 commit comments