8000 docs: updated · Tony133/nestjs-postgres@1f1c696 · GitHub
[go: up one dir, main page]

Skip to content

Commit 1f1c696

Browse files
authored
docs: updated
1 parent dab552a commit 1f1c696

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff 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 *',

0 commit comments

Comments
 (0)
0