move toMap function to be a method on the quota structs

This commit is contained in:
woodsaj
2015-09-15 17:18:26 +08:00
parent b7de847236
commit 86ed85aa6e
3 changed files with 38 additions and 26 deletions
+2 -2
View File
@@ -57,7 +57,7 @@ func GetOrgQuotas(query *m.GetOrgQuotasQuery) error {
return err
}
defaultQuotas := m.QuotaToMap(setting.Quota.Org)
defaultQuotas := setting.Quota.Org.ToMap()
seenTargets := make(map[string]bool)
for _, q := range quotas {
@@ -157,7 +157,7 @@ func GetUserQuotas(query *m.GetUserQuotasQuery) error {
return err
}
defaultQuotas := m.QuotaToMap(setting.Quota.User)
defaultQuotas := setting.Quota.User.ToMap()
seenTargets := make(map[string]bool)
for _, q := range quotas {