Skip to content

Commit

Permalink
Merge pull request #345 from ral-facilities/fix-traces
Browse files Browse the repository at this point in the history
Fix traces
  • Loading branch information
louise-davies authored Jan 26, 2024
2 parents e3c2f7d + 53046d7 commit 0e4a197
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .yarn/sdks/typescript/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "typescript",
"version": "5.1.6-sdk",
"version": "5.3.3-sdk",
"main": "./lib/typescript.js",
"type": "commonjs",
"bin": {
Expand Down
4 changes: 2 additions & 2 deletions e2e/traces.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,8 @@ test('user can change trace via clicking on a thumbnail', async ({ page }) => {
ctx.status(200),
ctx.json({
_id: '2',
x: '[2, 4, 6, 8, 10, 12, 14, 16, 18, 20]',
y: '[8, 1, 10, 9, 4, 3, 5, 6, 2, 7]',
x: [2, 4, 6, 8, 10, 12, 14, 16, 18, 20],
y: [8, 1, 10, 9, 4, 3, 5, 6, 2, 7],
})
);
}
Expand Down
6 changes: 1 addition & 5 deletions src/api/waveforms.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,7 @@ export const fetchWaveform = async (
},
})
.then((response) => {
return {
...response.data,
x: JSON.parse(response.data.x),
y: JSON.parse(response.data.y),
};
return response.data;
});
};

Expand Down
4 changes: 2 additions & 2 deletions src/mocks/handlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -265,8 +265,8 @@ export const handlers = [
ctx.status(200),
ctx.json({
_id: '1',
x: '[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]',
y: '[2, 10, 8, 7, 1, 4, 5, 3, 6, 9]',
x: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],
y: [2, 10, 8, 7, 1, 4, 5, 3, 6, 9],
})
);
}),
Expand Down

0 comments on commit 0e4a197

Please sign in to comment.