Made expandable man in REST Mock (#269)
Reviewed-on: #269 Reviewed-by: Mikolaj Widla <widlam@noreply.example.com> Co-authored-by: Adam Bem <adam.bem@zoho.eu> Co-committed-by: Adam Bem <adam.bem@zoho.eu>
This commit is contained in:
@@ -10,7 +10,7 @@ const props = defineProps(
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="w-full text-center dark:text-white mt-2 flex flex-col gap-4 ">
|
||||
<div class="w-full h-2/3 text-center dark:text-white mt-2 flex flex-col gap-4 overflow-auto">
|
||||
<div class="flex flex-row gap-4">
|
||||
<div class="w-full font-bold">Name</div>
|
||||
<div class="w-full font-bold">Value</div>
|
||||
|
||||
@@ -52,7 +52,6 @@ function showUpdatedCode(newCode : string){
|
||||
<a class="underline" :href="mockMessageLink">{{ mockMessageLink }}</a>
|
||||
</div>
|
||||
</div>
|
||||
<a class="tool-button" href="/man/rest-mock">Help</a>
|
||||
<SaveComponent v-bind:message-data="messageData"></SaveComponent>
|
||||
</div>
|
||||
<div class="flex flex-col md:flex-row w-full gap-4">
|
||||
|
||||
@@ -15,7 +15,7 @@ const visible = ref('hidden');
|
||||
const fetchLink = window.location.protocol + "//" + window.location.hostname + "/mock/api/mock";
|
||||
|
||||
function prepareAndSendData(){
|
||||
if (props.messageData != null|| props.messageData != undefined ){
|
||||
if (props.messageData != null || props.messageData != undefined ){
|
||||
fetch(fetchLink, { method: "put", body:JSON.stringify(props.messageData), headers: { "Content-Type" : "application/json" }})
|
||||
.then( response => response.text() )
|
||||
.then( data => {message.value = data} )
|
||||
|
||||
Reference in New Issue
Block a user