Skip to content

Commit

Permalink
feat[close #21]: Support for stories
Browse files Browse the repository at this point in the history
  • Loading branch information
mirkobrombin committed Jul 11, 2024
1 parent 15c0e9a commit be6dd23
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions core/handler_articles.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ func HandleArticles(w http.ResponseWriter, r *http.Request) {
SupportedLang: repo.Languages,
Tags: tags,
Articles: articles,
Stories: repo.Stories,
}

w.Header().Set("Content-Type", "application/json")
Expand Down
9 changes: 5 additions & 4 deletions structs/articleResponse.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ package structs

// ArticlesResponse is the response struct for the /articles endpoint.
type ArticlesResponse struct {
Title string `json:"title"`
SupportedLang []string `json:"SupportedLang"`
Tags []string `json:"tags"`
Articles []Article `json:"articles"`
Title string `json:"title"`
SupportedLang []string `json:"SupportedLang"`
Tags []string `json:"tags"`
Articles []Article `json:"articles"`
Stories map[string]Story `json:"stories"`
}

0 comments on commit be6dd23

Please sign in to comment.