Skip to content

Commit fe5ceee

Browse files
committed
fixed testcase for topic
1 parent 4cae035 commit fe5ceee

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

_apidoc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1593,7 +1593,7 @@
15931593
* @apiSuccess {String[]} faculty.designation Faculty member's designation.
15941594
* @apiSuccess {String} faculty.natureOfAssociation Nature of association with the institution.
15951595
* @apiSuccess {String} faculty.additionalResponsibilities Additional responsibilities of the faculty.
1596-
**/
1596+
*/
15971597

15981598
//------------------------------------------------------------------------------------------
15991599
// Topics.

app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,6 @@ app.use("/group", groupRouter);
6565
app.use("/semester", semesterRouter);
6666
app.use("/faculty", facultyRouter);
6767
app.use("/performance", performarouter);
68-
app.use("topic",topicRouter);
68+
app.use("/topic",topicRouter);
6969

7070
export default app;

controller/topic.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010
try {
1111
// eslint-disable-next-line max-len
1212
const topic = await addNewTopic(title);
13-
res.json({ res: `added accreditation ${topic.name}`, id: topic.id });
13+
res.json({ res: `added topic ${topic.name}`, id: topic.id });
1414
} catch (error) {
1515
logger.error("Error while inserting", error);
1616
res.status(500);

services/topic.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ export async function addNewTopic(title) {
55
const newTopic = await Topic.create({
66
title,
77
});
8-
if (newTopic.name === name) {
9-
return newAopic;
8+
if (newTopic.title === title) {
9+
return newTopic;
1010
}
1111
throw new databaseError.DataEntryError("Add Topic");
1212
}

0 commit comments

Comments
 (0)