fix: use int for stars in /projects route
i'm tired
This commit is contained in:
parent
a3eb6c6e32
commit
26ed84f50b
3 changed files with 3 additions and 8 deletions
|
|
@ -2,7 +2,7 @@ package model
|
|||
|
||||
type GitHubAPI struct {
|
||||
Description string `json:"description"`
|
||||
Stars uint32 `json:"stargazers_count"`
|
||||
Stars int `json:"stargazers_count"`
|
||||
Language string `json:"language"`
|
||||
Url string `json:"html_url"`
|
||||
}
|
||||
|
|
@ -10,7 +10,7 @@ type GitHubAPI struct {
|
|||
type GitHubData struct {
|
||||
Name string `json:"name"`
|
||||
Description string `json:"description"`
|
||||
Stars string `json:"stars"`
|
||||
Stars int `json:"stars"`
|
||||
Language string `json:"language"`
|
||||
Url string `json:"url"`
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +0,0 @@
|
|||
package model
|
||||
|
||||
type HitCounter struct {
|
||||
Counter uint32 `json:"counter"`
|
||||
}
|
||||
|
|
@ -52,7 +52,7 @@ func GetGitHubData() []model.GitHubData {
|
|||
data = append(data, model.GitHubData{
|
||||
Name: project,
|
||||
Description: apiResponse.Description,
|
||||
Stars: fmt.Sprint(apiResponse.Stars),
|
||||
Stars: apiResponse.Stars,
|
||||
Language: apiResponse.Language,
|
||||
Url: apiResponse.Url,
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in a new issue