Skip to content

Commit cf8079c

Browse files
committed
Complete the API
1 parent 7399df4 commit cf8079c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/api/accounts_api.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
// http://opensource.org/licenses/MIT)
66
//=======================================================================
77

8-
#include <set>
9-
108
#include "api/server_api.hpp"
119
#include "api/accounts_api.hpp"
1210

@@ -28,6 +26,7 @@ void budget::add_accounts_api(const httplib::Request& req, httplib::Response& re
2826
account.amount = budget::money_from_string(req.get_param_value("input_amount"));
2927
account.since = find_new_since();
3028
account.until = budget::date(2099, 12, 31);
29+
account.hide_if_empty = req.get_param_value("input_hide_if_empty") == "yes";
3130

3231
auto id = add_account(std::move(account));
3332

@@ -48,6 +47,7 @@ void budget::edit_accounts_api(const httplib::Request& req, httplib::Response& r
4847
account account = get_account(budget::to_number<size_t>(id));
4948
account.name = req.get_param_value("input_name");
5049
account.amount = budget::money_from_string(req.get_param_value("input_amount"));
50+
account.hide_if_empty = req.get_param_value("input_hide_if_empty") == "yes";
5151

5252
edit_account(account);
5353

0 commit comments

Comments
 (0)