T248 T245 /mock/json path changed to /api/mock; mapping '/' moved to MainController

This commit is contained in:
2021-03-26 15:27:59 +01:00
parent eba27650e1
commit e81e4b1d56
13 changed files with 104 additions and 80 deletions

View File

@@ -38,7 +38,7 @@ $('#btn-addRow').click(function(){addRow()});
$('#btn-save').click(getUpdate);
function getData(){
$.getJSON(host + '/mock/json/'+clientUUID, function(data) {
$.getJSON(host + '/api/mock/'+clientUUID, function(data) {
json = data;
checkUuid();
console.log(JSON.stringify(json));
@@ -155,7 +155,7 @@ function updateData(){
savedModalDisplay();
}
$.ajax({
url: host + '/mock/json',
url: host + '/api/mock',
type: 'PUT',
data: JSON.stringify(updatedJson, null, 2),
contentType: "application/json",
@@ -174,7 +174,7 @@ function callAddMessage(){
function addMessage(){
$.ajax({
url: host + '/mock/json/'+clientUUID,
url: host + '/api/mock/'+clientUUID,
type: 'POST',
}).done(dataRefresh);
}
@@ -192,7 +192,7 @@ function callRemoveMessage(id){
function removeMessage(id){
var jsonObject = findJsonById(id);
$.ajax({
url: host + '/mock/json/'+clientUUID + '/' + id,
url: host + '/api/mock/'+clientUUID + '/' + id,
type: 'DELETE',
}).done(dataRefresh);
}
@@ -225,7 +225,7 @@ function fillStaticFields(uuid, id, mediaType, body, httpStatus){
}
function createLink(uuid, id){
var link = host + '/klaus/v1/get/'+uuid+'/'+id;
var link = host + '/api/mock/r/'+uuid+'/'+id;
return link;
}