fix settings

This commit is contained in:
Simon Larsen
2023-05-14 21:13:51 +01:00
parent 5baf3f0496
commit 61e590e161
10 changed files with 78 additions and 66 deletions

View File

@@ -29,8 +29,7 @@ router.get(
let responseHeaders: JSONValue | undefined =
LocalCache.getJSON('TestServer', 'responseHeaders') || {};
if(responseHeaders && typeof responseHeaders === Typeof.String) {
if (responseHeaders && typeof responseHeaders === Typeof.String) {
responseHeaders = JSON.parse(responseHeaders.toString());
}
@@ -45,7 +44,7 @@ router.get(
res,
responseCode,
responseBody,
responseHeaders ? responseHeaders as any : {}
responseHeaders ? (responseHeaders as any) : {}
);
} catch (err) {
return next(err);

View File

@@ -33,9 +33,9 @@ router.post(
| string
| undefined;
const responseHeaders: JSONObject | undefined = data['responseHeaders'] as
| JSONObject
| undefined;
const responseHeaders: JSONObject | undefined = data[
'responseHeaders'
] as JSONObject | undefined;
LocalCache.setJSON(
'TestServer',