Added authorization
This commit is contained in:
parent
c3c3d65d32
commit
b96dd39795
50 changed files with 685 additions and 410 deletions
|
|
@ -22,7 +22,7 @@ func CreatePostService(repo repository.PostRepository) PostService {
|
|||
}
|
||||
|
||||
func (s *PostService) Create(cmd commands.CreatePostCommand) (*common.PostResult, error) {
|
||||
entity, err := entities.CreatePost(cmd.UserId, cmd.Title, cmd.Description, cmd.Content)
|
||||
entity, err := entities.CreatePost(cmd.UserId, cmd.Title, cmd.Description, cmd.Content, cmd.Category, cmd.Tags)
|
||||
if err != nil {
|
||||
return nil, errors.NewValidationError("Invalid input data " + err.Error())
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue