Skip to content

Commit

Permalink
There was a few console.logs I forgot to remove
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian Michael Kang authored and Christian Michael Kang committed Sep 26, 2024
1 parent a9ee70a commit e9ff7fc
Showing 1 changed file with 6 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -213,25 +213,25 @@ export const YamlWriterUpload = (props: YamlWriterUploadProps) => {
// Switch case to handle different types of files
switch (type) {
case "HAR":
if (file && 'log' in file && Array.isArray(file.log.entries)) {
if (file && "log" in file && Array.isArray(file.log.entries)) {
log("Creating file array for HAR", LogLevel.DEBUG);
createFileArray(file);
} else {
throw new Error('Invalid Har file');
throw new Error("Invalid Har file");
}
break;
case "HTML":
if (file instanceof Document) {
await handleHTMLfile(file);
} else {
throw new Error('Invalid HTML file');
throw new Error("Invalid HTML file");
}
break;
case "Swagger":
if ((file && 'openapi' in file && 'paths' in file)) {
if ((file && "openapi" in file && "paths" in file)) {
await handleSwaggerfile(file as OpenAPIV3.Document);
} else {
throw new Error ('Invalid Swagger file');
throw new Error ("Invalid Swagger file");
}
break;
}
Expand Down Expand Up @@ -306,7 +306,7 @@ export const YamlWriterUpload = (props: YamlWriterUploadProps) => {
handleFileUpload(doc, "HTML", endpointModalRef);
}
};


const toggleSwaggerUrlModal = async (swaggerData: SwaggerDoc3) => {

Check warning on line 311 in guide/results-viewer-react/src/components/YamlWriterUpload/index.tsx

View workflow job for this annotation

GitHub Actions / Build guide (18.x)

Async arrow function has no 'await' expression

Check warning on line 311 in guide/results-viewer-react/src/components/YamlWriterUpload/index.tsx

View workflow job for this annotation

GitHub Actions / Build guide (20.x)

Async arrow function has no 'await' expression

Check warning on line 311 in guide/results-viewer-react/src/components/YamlWriterUpload/index.tsx

View workflow job for this annotation

GitHub Actions / Build guide (22.x)

Async arrow function has no 'await' expression
if (swaggerData) {
Expand Down Expand Up @@ -705,13 +705,11 @@ export const YamlWriterUpload = (props: YamlWriterUploadProps) => {
for (const responseCode in operation.responses) {
const response = operation.responses[responseCode];
if ("$ref" in response) {
console.log("Here");
break;
} else {
const responseObj = response as OpenAPIV3.ResponseObject;
if (responseObj.content) {
mimeType = Object.keys(responseObj.content)[0] || "*/*";
console.log(Object.keys(responseObj.content)[0]);
break;
}
}
Expand Down

0 comments on commit e9ff7fc

Please sign in to comment.