From 2cf6cd9902d6498bb8dd01b64b2eb4e9173986fd Mon Sep 17 00:00:00 2001 From: stvort Date: Fri, 29 Apr 2022 20:38:43 +0400 Subject: [PATCH] 2021-11 hateoas example updated --- .../spring-data-rest/src/main/resources/static/index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/2021-11/spring-38/spring-data-rest/src/main/resources/static/index.html b/2021-11/spring-38/spring-data-rest/src/main/resources/static/index.html index f469f6d7..86e8a0c2 100644 --- a/2021-11/spring-38/spring-data-rest/src/main/resources/static/index.html +++ b/2021-11/spring-38/spring-data-rest/src/main/resources/static/index.html @@ -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) {