Skip to content

Commit

Permalink
Added loop which initializes article's publisher in JsonParser
Browse files Browse the repository at this point in the history
  • Loading branch information
werniq committed Oct 12, 2024
1 parent 18272cf commit 46dca10
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmd/parsers/json_parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,9 @@ func (jp JsonParser) Parse() ([]types.News, error) {
return nil, err
}

for i := 0; i <= len(news)-1; i++ {
news[i].Publisher = jp.Source
}

return news, nil
}

0 comments on commit 46dca10

Please sign in to comment.