modification api returns updated model object instead of processing result

This commit is contained in:
MaysWind
2021-01-03 21:37:32 +08:00
parent a947b1ae8c
commit 0d4be75b22
3 changed files with 48 additions and 3 deletions
+6 -1
View File
@@ -238,7 +238,12 @@ func (a *TransactionCategoriesApi) CategoryModifyHandler(c *core.Context) (inter
log.InfofWithRequestId(c, "[transaction_categories.CategoryModifyHandler] user \"uid:%d\" has updated category \"id:%d\" successfully", uid, categoryModifyReq.Id)
return true, nil
newCategory.Type = category.Type
newCategory.ParentCategoryId = category.ParentCategoryId
newCategory.DisplayOrder = category.DisplayOrder
categoryResp := newCategory.ToTransactionCategoryInfoResponse()
return categoryResp, nil
}
// CategoryHideHandler hides an existed transaction category by request parameters for current user