code refactor
This commit is contained in:
@@ -33,7 +33,7 @@ func (s *TransactionCategoryService) GetAllCategoriesByUid(uid int64, categoryTy
|
||||
}
|
||||
|
||||
condition := "uid=? AND deleted=?"
|
||||
var conditionParams []interface{}
|
||||
conditionParams := make([]interface{}, 0, 8)
|
||||
conditionParams = append(conditionParams, uid)
|
||||
conditionParams = append(conditionParams, false)
|
||||
|
||||
|
||||
@@ -351,7 +351,7 @@ func (s *TransactionService) ModifyTransaction(transaction *models.Transaction,
|
||||
return errs.ErrUserIdInvalid
|
||||
}
|
||||
|
||||
var updateCols []string
|
||||
updateCols := make([]string, 0, 16)
|
||||
|
||||
now := time.Now().Unix()
|
||||
|
||||
|
||||
@@ -151,7 +151,7 @@ func (s *UserService) UpdateUser(user *models.User) (keyProfileUpdated bool, err
|
||||
return false, errs.ErrUserIdInvalid
|
||||
}
|
||||
|
||||
var updateCols []string
|
||||
updateCols := make([]string, 0, 8)
|
||||
|
||||
now := time.Now().Unix()
|
||||
keyProfileUpdated = false
|
||||
|
||||
Reference in New Issue
Block a user