Tool: JSHint (Static Analysis)#130
Closed
saisankhe wants to merge 73 commits into
Closed
Conversation
Refactored blocks.js
Andrew project1 refactor
refactored postsController.redirectToPost into helper functions to re…
refactor: copy P1 infinitescroll changes
Reduced complexity of authentication - ssura 1b commit
added poll database for the poll creation feature
Connected database to backend api for polls
Create poll view and add new poll UI
This reverts commit caeb0cf.
Description: Added poll voting to the database layer with duplicate vote prevention. All poll GET responses with a hasVoted field so the frontend knows whether the current user has already voted. Connected the vote endpoint through the controller and route layers. Changes: src/polls.js — Added Polls.vote() with duplicate vote prevention, vote counting, and response tracking. Added uid parameter to get(), getAll(), and getMultiple() to attach a hasVoted boolean to each poll response. src/controllers/polls.js — Added pollsController.vote handler with optionId validation. Updated get and getAll to pass req.uid through to the data layer. src/routes/polls.js — Mounted POST /api/polls/:pollId/vote behind ensureLoggedIn middleware. test/polls.js (new) — Added 13 test cases covering poll creation, retrieval, voting, duplicate vote rejection, multi-user voting, invalid option handling, and deletion. Testing: Tests in test/polls.js all passed. Further end-to-end testing will be done after frontend is integrated.
… allow users to vote, display poll results
Feature: Basic voting UI
Added poll documentation to UserGuide.md
Feature: autoComplete works as intended and is ready to merge (see above comment)
Added a new section for the Search Autocomplete implementation, detailing its features, user flow, technical flow, database schema, API examples, and testing procedures.
Expand User Guide with Search Autocomplete details.
Fix: link to the test file was not working so added a new working link
Update UserGuide.md to include working link for autocomplete test file
Feat/poll results
Autocomplete Bug Fixes and Enhancements
Deployment
Update VM Deploy.yml
Update docker-compose-redis.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
JSHint is a program that flags suspicious usage in programs written in JavaScript. The core project consists of a library itself as well as a CLI program distributed as a Node module.
Installation: Installed via npm install --save-dev jshint and ran with npx jshint src/
Evidence: See jshint-output.txt for full output. 30488 warnings were produced across the codebase.
Pros of JSHint:
Cons of JSHint:
Customisation:
Quantitative Evidence: