ardasen commited on
Commit
c683738
·
1 Parent(s): 79d3e11

Update server.js

Browse files
Files changed (1) hide show
  1. server.js +5 -2
server.js CHANGED
@@ -52,10 +52,13 @@ app.post('/upload', upload.single('file'), async (req, res) => {
52
 
53
 
54
 
55
- // Forward the response from the Whisper API back to the iOS app
56
- res.status(whisperResponse.status).json(whisperResponse.data);
57
 
 
 
58
 
 
 
59
  } catch (error) {
60
  console.error(error);
61
  res.status(500).json({ error: 'Internal Server Error' });
 
52
 
53
 
54
 
55
+
 
56
 
57
+ // Parse the JSON response from Whisper API
58
+ const jsonResponse = JSON.parse(whisperResponse.data);
59
 
60
+ // Forward the parsed JSON response from the Whisper API back to the iOS app
61
+ res.status(whisperResponse.status).json(jsonResponse);
62
  } catch (error) {
63
  console.error(error);
64
  res.status(500).json({ error: 'Internal Server Error' });