Commit 79e74843 authored by Yusril Rapsanjani's avatar Yusril Rapsanjani

Update index.py

parent 2a2a4ca8
......@@ -90,8 +90,8 @@ def createNasabah():
lastname = request.args['lastname']
apikey = request.args['keys']
controller = Nasabah_Controller()
data = controller.Create(username, password, email, phone, address, firstname, lastname, apikey)
controller = Nasabah_Controller(apikey)
data = controller.Create(username, password, email, phone, address, firstname, lastname)
return jsonify(data)
......@@ -113,8 +113,8 @@ def loginNasabah():
password = request.args['password']
apikey = request.args['keys']
controller = Nasabah_Controller()
data = controller.Login(username, password, apikey)
controller = Nasabah_Controller(apikey)
data = controller.Login(username, password)
return jsonify(data)
......@@ -136,8 +136,8 @@ def deposit():
apikey = request.args['keys']
amount = int(request.args['amount'])
controller = Transaction_Controller()
data = controller.Insert(norek, amount, apikey)
controller = Transaction_Controller(apikey)
data = controller.Insert(norek, amount)
return jsonify(data)
......@@ -159,8 +159,8 @@ def withdraw():
apikey = request.args['keys']
amount = int(request.args['amount'])
controller = Transaction_Controller()
data = controller.Take(norek, amount, apikey)
controller = Transaction_Controller(apikey)
data = controller.Take(norek, amount)
return jsonify(data)
......@@ -185,8 +185,8 @@ def transfer():
notes = request.args['notes']
apikey = request.args['keys']
controller = Transaction_Controller()
data = controller.Send(from_norek, to_norek, amount, notes, apikey)
controller = Transaction_Controller(apikey)
data = controller.Send(from_norek, to_norek, amount, notes)
return jsonify(data)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment