Skip to content

Commit

Permalink
handle error with post creation image
Browse files Browse the repository at this point in the history
  • Loading branch information
Pomog committed Jan 18, 2024
1 parent 8cdcc68 commit 33fb1cd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/handler/themeHandler.go
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,8 @@ func createPostFromRequest(m *Repository, w http.ResponseWriter, r *http.Request
return post, errors.New(errorMsg)
}

AttachFile(m, w, r, &post, nil)
return post, nil
err:= AttachFile(m, w, r, &post, nil)
return post, err
}

// getPostsInfo retrieves information for rendering posts.
Expand Down

0 comments on commit 33fb1cd

Please sign in to comment.