File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -180,12 +180,12 @@ export class PostService {
180
180
private dbConnection : Client ,
181
181
) {}
182
182
183
- public async findAll(): Promise <User []> {
183
+ public async findAll(): Promise <Post []> {
184
184
const users = await this .dbConnection .query (' SELECT * FROM posts' );
185
185
return users .rows ;
186
186
}
187
187
188
- public async create(createPostDto : CreatePostDto ): Promise <User > {
188
+ public async create(createPostDto : CreatePostDto ): Promise <Post [] > {
189
189
try {
190
190
const user = await this .dbConnection .query (
191
191
' INSERT INTO posts (title, description) VALUES ($1, $2) RETURNING *' ,
@@ -219,7 +219,7 @@ export class UsersService {
219
219
return users .rows ;
220
220
}
221
221
222
- public async create(createUserDto : CreateUserDto ): Promise <User > {
222
+ public async create(createUserDto : CreateUserDto ): Promise <User [] > {
223
223
try {
224
224
const user = await this .dbConnection .query (
225
225
' INSERT INTO users (firstName, lastName) VALUES ($1, $2) RETURNING *' ,
You can’t perform that action at this time.
0 commit comments