mirror of
https://github.com/usebruno/bruno.git
synced 2026-06-11 09:51:30 +00:00
docs(converters): Fix example code to await (#6960)
Updated example code to use await with postmanToBruno function. Also change markdown code from `bash copy` to `javascript`
This commit is contained in:
@@ -54,7 +54,7 @@ const brunoCollection = await wsdlToBruno(wsdlContent);
|
||||
|
||||
## Example
|
||||
|
||||
```bash copy
|
||||
```javascript
|
||||
|
||||
const { postmanToBruno } = require('@usebruno/converters');
|
||||
const fs = require('fs/promises');
|
||||
@@ -66,7 +66,7 @@ async function convertPostmanToBruno(inputFile, outputFile) {
|
||||
const inputData = await fs.readFile(inputFile, 'utf8');
|
||||
|
||||
// Convert to Bruno collection
|
||||
const brunoCollection = postmanToBruno(JSON.parse(inputData));
|
||||
const brunoCollection = await postmanToBruno(JSON.parse(inputData));
|
||||
|
||||
// Save Bruno collection
|
||||
await fs.writeFile(outputFile, JSON.stringify(brunoCollection, null, 2));
|
||||
|
||||
Reference in New Issue
Block a user