Skip to content

Commit

Permalink
Merge pull request #492 from techcomrade/fix/huy
Browse files Browse the repository at this point in the history
fix(web): fix record response
  • Loading branch information
hwt75 authored Jul 16, 2024
2 parents da5e809 + 6c0850e commit 823fce8
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion frontend_web/public/locales/vi.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"refresh": "Làm mới"
},
"modal": {
"record-graph": "Đồ thị records"
"record-graph": "Đồ thị dữ liệu phiên đo"
},
"homepage": {
"number-of-users-are-using": "Số lượng người dùng đang hoạt động",
Expand Down
2 changes: 1 addition & 1 deletion frontend_web/src/components/Modal/ModalChart.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const ModalChart = ({ isOpen, setIsOpen, selectedDevice }) => {

return (
<Modal
title={t("modal-chart.record-graph")}
title={t("modal.record-graph")}
open={isOpen}
cancelText={t("modal-chart.cancel")}
onCancel={handleCancel}
Expand Down
2 changes: 1 addition & 1 deletion server-web/controllers/RecordController.js
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ class RecordController {
});
}

const filepath = await RecordService.getFilePathById(req.params.id);
const filepath = record[0].dataValues.data_rec_url;
if (!fs.existsSync(filepath)) {
return res.status(404).json({
message: "record file not found",
Expand Down
4 changes: 2 additions & 2 deletions server-web/services/RecordService.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,11 +150,11 @@ class RecordService extends CommonService {
});
});
let arrayValue = {
ECG: { frequency: null, data: [] },
PPG: { frequency: null, data: [] },
PCG: { frequency: null, data: [] },
heartRate: { frequency: null, data: [] },
};
let fieldNames = ["PPG", "PCG", "heartRate"];
let fieldNames = ["ECG", "PPG", "PCG"];
for (let i = 6; i < 9; i++) {
let field = fieldNames[i - 6];
arrayValue[field].frequency = device_freq_value;
Expand Down

0 comments on commit 823fce8

Please sign in to comment.