refactor: init newstore for request body

Co-authored-by: Andrew Bastin <andrewbastin.k@gmail.com>
This commit is contained in:
liyasthomas
2021-08-14 14:31:16 +05:30
parent e9eee0703d
commit a129d7eb13
4 changed files with 188 additions and 128 deletions

View File

@@ -5,7 +5,7 @@
bg-primary
border-b border-dividerLight
flex flex-1
pl-4 pl-4
pl-4
items-center
justify-between
"
@@ -44,11 +44,11 @@
/>
</tippy>
</span>
<SmartToggle :on="rawInput" class="px-2" @change="rawInput = !rawInput">
{{ $t("raw_input") }}
</SmartToggle>
</div>
<HttpBodyParameters v-if="!rawInput" :content-type="contentType" />
<HttpBodyParameters
v-if="contentType == 'multipart/form-data'"
:content-type="contentType"
/>
<HttpRawBody v-else :content-type="contentType" />
</div>
</template>
@@ -63,7 +63,6 @@ export default defineComponent({
setup() {
return {
contentType: pluckRef(useRESTRequestBody(), "contentType"),
rawInput: pluckRef(useRESTRequestBody(), "isRaw"),
}
},
data() {