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:
parent
247aef5ef3
commit
8f87c4e283
@ -26,7 +26,7 @@ type StatsData struct {
|
|||||||
Machines []*SummariesEntry `json:"machines"`
|
Machines []*SummariesEntry `json:"machines"`
|
||||||
Projects []*SummariesEntry `json:"projects"`
|
Projects []*SummariesEntry `json:"projects"`
|
||||||
OperatingSystems []*SummariesEntry `json:"operating_systems"`
|
OperatingSystems []*SummariesEntry `json:"operating_systems"`
|
||||||
Branches []*SummariesEntry `json:"branches"`
|
Branches []*SummariesEntry `json:"branches,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewStatsFrom(summary *models.Summary, filters *models.Filters) *StatsViewModel {
|
func NewStatsFrom(summary *models.Summary, filters *models.Filters) *StatsViewModel {
|
||||||
|
@ -26,7 +26,7 @@ type SummariesData struct {
|
|||||||
Machines []*SummariesEntry `json:"machines"`
|
Machines []*SummariesEntry `json:"machines"`
|
||||||
OperatingSystems []*SummariesEntry `json:"operating_systems"`
|
OperatingSystems []*SummariesEntry `json:"operating_systems"`
|
||||||
Projects []*SummariesEntry `json:"projects"`
|
Projects []*SummariesEntry `json:"projects"`
|
||||||
Branches []*SummariesEntry `json:"branches"`
|
Branches []*SummariesEntry `json:"branches,omitempty"`
|
||||||
GrandTotal *SummariesGrandTotal `json:"grand_total"`
|
GrandTotal *SummariesGrandTotal `json:"grand_total"`
|
||||||
Range *SummariesRange `json:"range"`
|
Range *SummariesRange `json:"range"`
|
||||||
}
|
}
|
||||||
|
@ -2080,7 +2080,7 @@
|
|||||||
" const jsonData = pm.response.json();",
|
" const jsonData = pm.response.json();",
|
||||||
" pm.expect(jsonData.data.languages).to.eql(null); // because share_languages is false",
|
" 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.projects.length).to.eql(1);",
|
||||||
" pm.expect(jsonData.data.branches).to.be.null;",
|
" pm.expect(jsonData.data.branches).to.be.undefined;",
|
||||||
"});"
|
"});"
|
||||||
],
|
],
|
||||||
"type": "text/javascript"
|
"type": "text/javascript"
|
||||||
|
Loading…
Reference in New Issue
Block a user