Skip to content

Commit

Permalink
Remove online survey getResponse API
Browse files Browse the repository at this point in the history
  • Loading branch information
esurface committed Jun 15, 2024
1 parent 3eaa97a commit a0011c2
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 18 deletions.
2 changes: 1 addition & 1 deletion server/src/express-app.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const { extendSession, findUserByUsername,
const {registerUser, getUserByUsername, isUserSuperAdmin, isUserAnAdminUser, getGroupsByUser, deleteUser,
getAllUsers, checkIfUserExistByUsername, findOneUserByUsername,
findMyUser, updateUser, restoreUser, updateMyUser} = require('./users');
const {login: surveyLogin, getResponse: getSurveyResponse, saveResponse: saveSurveyResponse, publishSurvey, unpublishSurvey, getOnlineSurveys} = require('./online-survey')
const {login: surveyLogin, saveResponse: saveSurveyResponse, publishSurvey, unpublishSurvey, getOnlineSurveys} = require('./online-survey')
const {
getCaseDefinitions,
getCaseDefinition,
Expand Down
17 changes: 0 additions & 17 deletions server/src/online-survey.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,22 +35,6 @@ const login = async (req, res) => {
}
}

const getResponse = async (req, res) => {
try {

const { groupId, formResponseId } = req.params;

console.log('getResponse', groupId, formResponseId);

const db = new DB(groupId);
const doc = await db.get(formResponseId);
return res.status(200).send(doc);
} catch (error) {
console.error(error);
return res.status(500).send('Could not get response');
}
};

const saveResponse = async (req, res) => {
try {
const { groupId, formId } = req.params;
Expand Down Expand Up @@ -141,7 +125,6 @@ const getOnlineSurveys = async (req, res) => {

module.exports = {
login,
getResponse,
saveResponse,
publishSurvey,
unpublishSurvey,
Expand Down

0 comments on commit a0011c2

Please sign in to comment.