-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.html
45 lines (43 loc) · 1.05 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<html>
<head>
<title>Here</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script src="/compiled/api/master.js"></script>
</head>
<body>
<script>
App = {
createAssessment: function(){
return $.ajax({
url: "http://localhost:9292/assessments?deck=career-deck",
type: "POST",
crossDomain: true,
success: function (response) {
},
error: function (xhr, status) {
alert("error");
}
});
},
getPublicKey: function(){
return $.ajax({
url: "http://localhost:9292/public_key",
type: "POST",
crossDomain: true,
success: function (response) {
},
error: function (xhr, status) {
alert("error");
}
});
}
}
App.getPublicKey().then(function(publicKey){
Traitify.setPublicKey(publicKey)
App.createAssessment().then(function(response){
App.assessmentId = response.id
})
})
</script>
</body>
</html>