Skip to content

Commit

Permalink
fix: modified post URL generation
Browse files Browse the repository at this point in the history
  • Loading branch information
karl-cardenas-coding committed Jun 21, 2024
1 parent 19b1085 commit babf694
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions news/announcements.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ func Fetch(year int, month int) (Announcements, error) {
announcement := Announcement{}
_, postDateMonth, _ := item.Item.AdditionalFields.PostDateTime.Date()
if postDateMonth == time.Now().Month() {
announcement.Link = awsWhatsNewPostBaseURL + item.Item.Name
announcement.Link = awsWhatsNewPostBaseURL + item.Item.AdditionalFields.HeadlineURL
announcement.PostDate = item.Item.AdditionalFields.PostDateTime.Format(time.RFC3339)
announcement.Title = item.Item.AdditionalFields.Headline
announcements = append(announcements, announcement)
Expand All @@ -138,7 +138,7 @@ func FetchYear(year int) (Announcements, error) {

for _, item := range items.Items {
announcement := Announcement{}
announcement.Link = fmt.Sprintf("%s/%s", awsWhatsNewPostBaseURL, item.Item.Name)
announcement.Link = fmt.Sprintf("%s/%s", awsWhatsNewPostBaseURL, item.Item.AdditionalFields.HeadlineURL)
announcement.PostDate = item.Item.DateCreated
announcement.Title = item.Item.AdditionalFields.Headline
announcements = append(announcements, announcement)
Expand Down

0 comments on commit babf694

Please sign in to comment.