Skip to content

Commit 6911891

Browse files
jaymshah3jaymshah3
authored andcommitted
creataeAccount
i think i made create account it dun work
1 parent 845a60c commit 6911891

File tree

4 files changed

+53
-6
lines changed

4 files changed

+53
-6
lines changed

Website/css/customJumbo.css

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@ body {
88
background-image: url('../images/newyork.jpg');
99
color: white;
1010
}
11-
.btn-lg{
11+
.btn-default{
1212
font-size: 24px;
13+
text-align: center;
1314
}
1415
ul.nav {
1516
font-size: 16px;
@@ -31,4 +32,10 @@ ul.nav {
3132
font-weight: 100;
3233
padding: .5px;
3334
}
34-
35+
.container h2{
36+
text-align: center;
37+
}
38+
.container p{
39+
font-size: 20px;
40+
text-align: center;
41+
}

Website/index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
<span class="icon-bar"></span>
4646
<span class="icon-bar"></span>
4747
</button>
48-
<a class="navbar-brand mainTitle" href="#">Better</a>
48+
<a class="navbar-brand mainTitle" href="#">Bookie</a>
4949
</div>
5050
<div id="navbar" class="collapse navbar-collapse">
5151
<ul class="nav navbar-nav navbar-right">
@@ -79,9 +79,9 @@ <h2>History</h2>
7979
<p><a class="btn btn-default" href="history.html" role="button">Go to History &raquo;</a></p>
8080
</div>
8181
<div class="col-md-6">
82-
<p><a class="btn btn-danger btn-lg" href="#" role="button">Log In&raquo;</a></p>
82+
<h2>Login</h2>
8383
<p>Log in using FaceBook to create bets with your friends! </p>
84-
<p><a class="btn btn-default" href="#" role="button">View details &raquo;</a></p>
84+
<p><a class="btn btn-default" href="#" role="button">Log In &raquo;</a></p>
8585
</div>
8686
</div>
8787

createAccount.js

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
var request = require("request");
2+
3+
function createAccount(id,body,callback){
4+
var baseURL = "http://api.reimaginebanking.com/customers/$id/accounts?key=$id"
5+
var requestURL = baseURL.replace(/\$id/g, id);
6+
console.log(requestURL);
7+
request.post({
8+
url: requestURL,
9+
json:body
10+
},function hap(error, response, body){
11+
callback(error, body);
12+
} )
13+
}
14+
15+
16+
var body = {
17+
"type": "Credit Card",
18+
"nickname": "Jay",
19+
"rewards": 2,
20+
"balance": 100,
21+
"account_number": "103"
22+
}
23+
24+
createAccount("5fd4a56f088983646d783535f830b417", body, function(error, body){
25+
26+
27+
if(error){
28+
console.log("there was an error!" + error);
29+
}
30+
else{
31+
console.log("no error");
32+
console.dir(body);
33+
}
34+
35+
36+
}
37+
38+
39+
);

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
"mongodb": "^2.2.26",
2929
"morgan": "^1.8.1",
3030
"passport": "^0.3.2",
31-
"passport-facebook": "^2.1.1"
31+
"passport-facebook": "^2.1.1",
32+
"request": "^2.81.0"
3233
}
3334
}

0 commit comments

Comments
 (0)