private async Task <List <HandlerServiceResult> > ConfigureCategorySupposedToSpentThisMonth(string answer, User user) { answer = answer.Trim(); if (string.IsNullOrEmpty(answer) || !long.TryParse(answer, out long number) || number <= 0) { return(new List <HandlerServiceResult> { _resultService.BuildCategoryInvalidSupposedToSpent() }); } var category = await _categoryDocumentService.GetByIdAsync(user.Context.CategoryId); category.SupposedToSpentThisMonthInCents = number * 100; category.ExpenseForThisMonthInCents = 0; category.ExpenseInCents = 0; category.Configured = true; await _categoryDocumentService.UpdateAsync(category); user.Context.CurrentNode = null; user.Context.CategoryId = null; await _userDocumentService.UpdateAsync(user); return(new List <HandlerServiceResult> { _resultService.BuildFinishedConfiguringCategoryResult() }); }