Skip to content

Commit 1f2a604

Browse files
authored
Merge pull request #312 from tcet-opensource/hotfix-fixing-resandexport
[Bug] fixed problem with duplicate exports and incorrect res message
2 parents b0ec7ea + b6d8b64 commit 1f2a604

File tree

3 files changed

+2
-6
lines changed

3 files changed

+2
-6
lines changed

controller/infrastructure.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ async function addInfrastructure(req, res) {
99
} = req.body;
1010
try {
1111
const newInfrastructure = await createInfrastructure(name, type, wing, floor, capacity);
12-
res.json({ res: `added user ${newInfrastructure.id}` });
12+
res.json({ res: `added infrastructure ${newInfrastructure.id}` });
1313
} catch (error) {
1414
logger.error("Error while inserting", error);
1515
res.status(500);

services/accreditation.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,3 @@ export async function updateAccreditationById(id, data) {
3737
}
3838
throw new databaseError.DataEntryError("Accrediation");
3939
}
40-
41-
export default {
42-
deleteAccreditationById, addNewAccreditation, updateAccreditationById,
43-
};

test/routes/infrastructure.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ describe("Infrastructure API", () => {
5252
});
5353

5454
expect(response.status).toBe(200);
55-
expect(response.body.res).toMatch(/added user/);
55+
expect(response.body.res).toMatch(/added infrastructure/);
5656
});
5757

5858
describe("after adding infrastructure", () => {

0 commit comments

Comments
 (0)