Compare commits

..

2 Commits

Author SHA1 Message Date
jamesgeorge007
263f8b3588 refactor: remove method chaining for consistency 2024-05-20 13:20:59 +05:30
nivedin
fc9f933905 fix: add previous value as optional 2024-05-17 00:00:13 +05:30
2 changed files with 4 additions and 5 deletions

View File

@@ -89,7 +89,6 @@ import { readFileAsText } from "~/helpers/functional/files"
import xmlFormat from "xml-formatter"
import { useNestedSetting } from "~/composables/settings"
import { toggleNestedSetting } from "~/newstore/settings"
import * as LJSON from "lossless-json"
type PossibleContentTypes = Exclude<
ValidContentTypes,
@@ -188,8 +187,8 @@ const prettifyRequestBody = () => {
let prettifyBody = ""
try {
if (body.value.contentType.endsWith("json")) {
const jsonObj = LJSON.parse(rawParamsBody.value as string)
prettifyBody = LJSON.stringify(jsonObj, undefined, 2) as string
const jsonObj = JSON.parse(rawParamsBody.value as string)
prettifyBody = JSON.stringify(jsonObj, null, 2)
} else if (body.value.contentType === "application/xml") {
prettifyBody = prettifyXML(rawParamsBody.value as string)
}

View File

@@ -400,7 +400,7 @@ const HoppTestResultSchema = z
(x) => "secret" in x && !x.secret
).and(
z.object({
previousValue: z.string(),
previousValue: z.optional(z.string()),
})
)
),
@@ -415,7 +415,7 @@ const HoppTestResultSchema = z
(x) => "secret" in x && !x.secret
).and(
z.object({
previousValue: z.string(),
previousValue: z.optional(z.string()),
})
)
),