1 |
e75db9cd
|
Jan Pašek
|
|
2 |
|
|
var certificateListingApp = new Vue({
|
3 |
|
|
el: "#certificateListingPage",
|
4 |
|
|
data: {
|
5 |
|
|
certificates: []
|
6 |
|
|
}
|
7 |
|
|
});
|
8 |
|
|
|
9 |
28787717
|
Jan Pašek
|
axios.get(API_URL + "certificates")
|
10 |
e75db9cd
|
Jan Pašek
|
.then(function (response) {
|
11 |
|
|
if (response.data["success"])
|
12 |
|
|
response.data["data"].forEach(item => certificateListingApp.certificates.push(item))
|
13 |
|
|
else
|
14 |
|
|
console.log("Error occured while loading certificate list") // TODO more action may be required
|
15 |
|
|
})
|
16 |
|
|
.catch(function (error) {
|
17 |
|
|
console.log(error);
|
18 |
|
|
});
|
19 |
|
|
|
20 |
|
|
function downloadCertificate(id) {
|
21 |
|
|
|
22 |
|
|
}
|