1
0
mirror of https://github.com/aclindsa/moneygo.git synced 2025-07-02 20:28:38 -04:00

Add per-user default currency

This commit is contained in:
2017-06-21 21:25:38 -04:00
parent 25b04a4f0f
commit 4e73e8b508
12 changed files with 237 additions and 23 deletions

View File

@ -13,6 +13,7 @@ function getJSONObj(json_input) {
class User {
constructor() {
this.UserId = -1;
this.DefaultCurrency = -1;
this.Name = "";
this.Username = "";
this.Password = "";
@ -21,6 +22,7 @@ class User {
toJSON() {
var json_obj = {};
json_obj.UserId = this.UserId;
json_obj.DefaultCurrency = this.DefaultCurrency;
json_obj.Name = this.Name;
json_obj.Username = this.Username;
json_obj.Password = this.Password;
@ -32,6 +34,8 @@ class User {
if (json_obj.hasOwnProperty("UserId"))
this.UserId = json_obj.UserId;
if (json_obj.hasOwnProperty("DefaultCurrency"))
this.DefaultCurrency = json_obj.DefaultCurrency;
if (json_obj.hasOwnProperty("Name"))
this.Name = json_obj.Name;
if (json_obj.hasOwnProperty("Username"))