Added authorization

This commit is contained in:
KamilM1205 2025-09-25 09:01:00 +04:00
parent c3c3d65d32
commit b96dd39795
50 changed files with 685 additions and 410 deletions

View file

@ -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())
}