TEAM41CS2340 / BuzzFunds

Spring 2014 CS 2340 Team 41 Group Project
0 stars 1 forks source link

Edit Account / Delete Account / Edit Interest Rate #22

Open aschenoni opened 10 years ago

aschenoni commented 10 years ago

User will be able to delete an account or modify the account name

aschenoni commented 10 years ago

API to delete: /deleteaccount?user=USERNAME&account=ACCOUNTNAME API to edit name: /editaccount?user=USERNAME&account=ACCOUNTNAME&new=NEWNAME API to edit interest: /editinterest?user=USERNAME&account=ACCOUNTNAME&interest=INTERESTRATE

aschenoni commented 10 years ago

@mischif @OzuYatamutsu

OzuYatamutsu commented 10 years ago

Got it, working on it now

OzuYatamutsu commented 10 years ago

@aschenoni For editing the name, how is the account identified on the server? If it's the String after &account=, where can I place the String in the URI which contains the new name?

aschenoni commented 10 years ago

good point, I'm editing it now. I was literally JUST thinking about that.

OzuYatamutsu commented 10 years ago

So, I'm getting an empty string response from the server when I try to delete the account, and the account doesn't delete.

The URI I'm using is http://buzzfunds.herokuapp.com/deleteaccount?user=admin&account=testSavings

aschenoni commented 10 years ago

ahhh yes im not done yet. It's giving me a lot of trouble. I'm almost there though

aschenoni commented 10 years ago

And try now! I think /deleteaccount works now

OzuYatamutsu commented 10 years ago

Delete works!

OzuYatamutsu commented 10 years ago

BLAZING THROUGH THIS NOW GOGOGOO

OzuYatamutsu commented 10 years ago

OK, the functionality in the app is there, except:

Editing the interest with the URI returns this from the server: ReferenceError: cNew is not defined at /app/app.js:471:37 at callbacks (/app/node_modules/express/lib/router/index.js:164:37) at param (/app/node_modules/express/lib/router/index.js:138:11) at pass (/app/node_modules/express/lib/router/index.js:145:5) at Router._dispatch (/app/node_modules/express/lib/router/index.js:173:5) at Object.router (/app/node_modules/express/lib/router/index.js:33:10) at next (/app/node_modules/express/node_modules/connect/lib/proto.js:193:15) at Object.methodOverride as handle at next (/app/node_modules/express/node_modules/connect/lib/proto.js:193:15) at Object.urlencoded as handle

...and editing the account name is successful, but the next call to retrieve accounts from the server returns a JSON string which is formatted in a different way and so

JSONArray ary = new JSONArray(res);

throws an Exception (but doesn't tell me what it is (e is null?!))