@@ -21,11 +21,11 @@ void budget::add_accounts_api(const httplib::Request& req, httplib::Response& re
2121 }
2222
2323 account account;
24- account.guid = budget::generate_guid ();
25- account.name = req.get_param_value (" input_name" );
26- account.amount = budget::money_from_string (req.get_param_value (" input_amount" ));
27- account.since = find_new_since ();
28- account.until = budget::date (2099 , 12 , 31 );
24+ account.guid = budget::generate_guid ();
25+ account.name = req.get_param_value (" input_name" );
26+ account.amount = budget::money_from_string (req.get_param_value (" input_amount" ));
27+ account.since = find_new_since ();
28+ account.until = budget::date (2099 , 12 , 31 );
2929 account.hide_if_empty = req.get_param_value (" input_hide_if_empty" ) == " yes" ;
3030
3131 auto id = add_account (std::move (account));
@@ -44,9 +44,9 @@ void budget::edit_accounts_api(const httplib::Request& req, httplib::Response& r
4444 return api_error (req, res, " account " + id + " does not exist" );
4545 }
4646
47- account account = get_account (budget::to_number<size_t >(id));
48- account.name = req.get_param_value (" input_name" );
49- account.amount = budget::money_from_string (req.get_param_value (" input_amount" ));
47+ account account = get_account (budget::to_number<size_t >(id));
48+ account.name = req.get_param_value (" input_name" );
49+ account.amount = budget::money_from_string (req.get_param_value (" input_amount" ));
5050 account.hide_if_empty = req.get_param_value (" input_hide_if_empty" ) == " yes" ;
5151
5252 edit_account (account);
0 commit comments