Skip to content

Commit b654696

Browse files
committed
fix api on testing
1 parent 31c57c1 commit b654696

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ Sample API
8181
![Request-Response-Design](.extra/docs/request-flow.svg)
8282

8383
### API DOC
84-
[![API Documentation](https://img.shields.io/badge/API%20Documentation-View%20Here-blue?style=for-the-badge)](https://documenter.getpostman.com/view/1552895/2sA3XWdefu)
84+
[![API Documentation](https://img.shields.io/badge/API%20Documentation-View%20Here-blue?style=for-the-badge)](https://documenter.getpostman.com/view/1552895/2sBXVihVLg)
8585

8686
## Installation Instructions
8787
vscode is the recommended editor - dark theme

api/blog/author/service.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -284,16 +284,18 @@ func (s *service) BlogSubmission(
284284
UPDATE blogs
285285
SET
286286
submitted = $1,
287+
drafted = $2,
287288
updated_at = CURRENT_TIMESTAMP
288-
WHERE id = $2
289-
AND author_id = $3
289+
WHERE id = $3
290+
AND author_id = $4
290291
AND status = TRUE
291292
`
292293

293294
tag, err := s.db.Exec(
294295
ctx,
295296
query,
296297
submit,
298+
!submit,
297299
blogID,
298300
author.ID,
299301
)

0 commit comments

Comments
 (0)