2021-11 hateoas example updated

This commit is contained in:
stvort
2022-04-29 20:38:43 +04:00
parent 41f291d80b
commit 2cf6cd9902
@@ -50,10 +50,10 @@
}
function getEntryPointHref() {
return fetch("api/profile")
return fetch("api/")
.then(data => data.json())
.then(data => data._links.persons)
.then(data => data.href.replace("/profile", ""))
.then(data => data.href.substr(0, data.href.indexOf("{")))
}
function addPerson(entryPointHref) {