1
0
mirror of https://github.com/muety/wakapi.git synced 2023-08-10 21:12:56 +03:00

fix: omit null branches property of wakatime summary

This commit is contained in:
Ferdinand Mütsch 2022-01-02 21:21:29 +01:00
parent 247aef5ef3
commit 8f87c4e283
3 changed files with 3 additions and 3 deletions

View File

@ -26,7 +26,7 @@ type StatsData struct {
Machines []*SummariesEntry `json:"machines"`
Projects []*SummariesEntry `json:"projects"`
OperatingSystems []*SummariesEntry `json:"operating_systems"`
Branches []*SummariesEntry `json:"branches"`
Branches []*SummariesEntry `json:"branches,omitempty"`
}
func NewStatsFrom(summary *models.Summary, filters *models.Filters) *StatsViewModel {

View File

@ -26,7 +26,7 @@ type SummariesData struct {
Machines []*SummariesEntry `json:"machines"`
OperatingSystems []*SummariesEntry `json:"operating_systems"`
Projects []*SummariesEntry `json:"projects"`
Branches []*SummariesEntry `json:"branches"`
Branches []*SummariesEntry `json:"branches,omitempty"`
GrandTotal *SummariesGrandTotal `json:"grand_total"`
Range *SummariesRange `json:"range"`
}

View File

@ -2080,7 +2080,7 @@
" const jsonData = pm.response.json();",
" pm.expect(jsonData.data.languages).to.eql(null); // because share_languages is false",
" pm.expect(jsonData.data.projects.length).to.eql(1);",
" pm.expect(jsonData.data.branches).to.be.null;",
" pm.expect(jsonData.data.branches).to.be.undefined;",
"});"
],
"type": "text/javascript"