Skip to content

Commit

Permalink
Updates and fixes for locked and unlocked online-survey-app
Browse files Browse the repository at this point in the history
  • Loading branch information
Erik Surface committed Jan 10, 2025
1 parent a792d55 commit 9ac8e2d
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@ export class LoginGuard implements CanActivate {
if (config['requireAccessCode'] === 'true') {
if (await this.authenticationService.isLoggedIn()) {
return true;
} else {
this.router.navigate(['survey-login'], { queryParams: { returnUrl: state.url } });
return false;
}
this.router.navigate(['survey-login'], { queryParams: { returnUrl: state.url } });
return false;
}

return true;
Expand Down
14 changes: 14 additions & 0 deletions online-survey-app/src/assets/forms.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[
{
"id": "user-profile",
"src": ".\/assets\/user-profile\/form.html",
"title": "User Profile",
"listed": false
},
{
"id": "reports",
"src": ".\/reports\/form.html",
"title": "Reports",
"listed": false
}
]
2 changes: 1 addition & 1 deletion server/src/online-survey.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const login = async (req, res) => {
const { groupId, accessCode } = req.params;

const groupDb = new DB(groupId)
let options = { key: accessCode, include_docs: true }
let options = { key: accessCode, include_docs: true, reduce: false }
if (req.params.limit) {
options.limit = req.params.limit
}
Expand Down

0 comments on commit 9ac8e2d

Please sign in to comment.