Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
148 commits
Select commit Hold shift + click to select a range
b9a969a
chore: added model folder for better stucture
tran2106 Jul 12, 2025
49d5bfb
feat: user model addeed adn export to db
tran2106 Jul 13, 2025
82e325b
feat: added auth0Id to support 2 methods of login/Hailia's feedback
tran2106 Jul 13, 2025
8711ff0
fix: changed passwordHash allowNull to true
tran2106 Jul 13, 2025
c84765a
Merge pull request #13 from TPP-Team1/models-user
haicomet Jul 13, 2025
ca01929
feat-define Poll model
Rend1027 Jul 14, 2025
22b77d4
feat-defined Vote model
Rend1027 Jul 14, 2025
4d92ca7
fix-fixed model attributes
Rend1027 Jul 14, 2025
25a36ac
chore-exported poll model from index
Rend1027 Jul 14, 2025
7e534ad
feat-Poll seed data
Rend1027 Jul 14, 2025
8257073
refactor-added console.log
Rend1027 Jul 14, 2025
e568559
fix-User model import
Rend1027 Jul 14, 2025
da88cc7
refactor-cleaned poll data
Rend1027 Jul 14, 2025
32b177c
Merge pull request #14 from TPP-Team1/poll_model
Rend1027 Jul 14, 2025
3972969
feat- defined pollOption Model
Rend1027 Jul 14, 2025
9b44ade
feat- created poll_option data
Rend1027 Jul 14, 2025
432728a
refactor- modified poll data to be more dinamic
Rend1027 Jul 14, 2025
15b7bf8
feat-created poll_option data
Rend1027 Jul 14, 2025
9f55ed8
refactor- made poll_option data more dinamic
Rend1027 Jul 14, 2025
dfac98e
Merge pull request #22 from TPP-Team1/poll_option
Rend1027 Jul 14, 2025
e94a08c
optimized user_model
Rend1027 Jul 14, 2025
2e228de
Merge pull request #24 from TPP-Team1/update_user_model
Rend1027 Jul 14, 2025
9b3c5a9
feat- associations
Rend1027 Jul 15, 2025
e1bcb9c
refactor- change DB name
Rend1027 Jul 15, 2025
2a3b0e8
fixed-bugs with model attributes
Rend1027 Jul 15, 2025
acdfc5c
Merge pull request #25 from TPP-Team1/poll_model
Rend1027 Jul 15, 2025
697ceaa
fixed-Poll FK
Rend1027 Jul 15, 2025
0e4db56
Merge pull request #26 from TPP-Team1/poll_model
Rend1027 Jul 15, 2025
adfb645
feat-votingRank model
Rend1027 Jul 15, 2025
a1ba0b4
defined VotingRank model
Rend1027 Jul 15, 2025
7c4cc31
feat- association
Rend1027 Jul 15, 2025
85544fb
feat- created Vote data
Rend1027 Jul 15, 2025
f252e90
feat- created voteRank data
Rend1027 Jul 15, 2025
bdc266c
fixed- bug in rank data
Rend1027 Jul 15, 2025
fd521c7
add username-based signup endpoint with validation
tran2106 Jul 15, 2025
eca4f0d
feat- added attributes to VotingRank
Rend1027 Jul 15, 2025
b5b23bd
feat- added attr to Vote model
Rend1027 Jul 15, 2025
4e9d505
fixed- association bugs
Rend1027 Jul 15, 2025
ced402c
create- restricted_poll_access model
Rend1027 Jul 15, 2025
c0cbdc9
: feat: email-based sign up and added validations
tran2106 Jul 15, 2025
76f36fa
feat- defined restricted_poll_access model
Rend1027 Jul 15, 2025
0d38a23
chore: credentials and callback url added to .env
haicomet Jul 15, 2025
d6dcc18
feat- defined associations for restricted
Rend1027 Jul 15, 2025
3211772
Merge pull request #33 from TPP-Team1/restricted_poll
Rend1027 Jul 15, 2025
810c2f0
feat(api)-poll router
Rend1027 Jul 15, 2025
6d35049
Merge pull request #34 from TPP-Team1/api-create_poll
Rend1027 Jul 15, 2025
c5d2a02
fix(auth): update signup/login routes for flexible input and model co…
tran2106 Jul 16, 2025
9f32d93
chore: routes/auth created
haicomet Jul 16, 2025
d70e864
feat: defined google strategy
haicomet Jul 16, 2025
02e2f89
feat: GET /auth/google route added
haicomet Jul 16, 2025
86b5520
feat: handle callback route + Issue JWT token and redirect to frontend
haicomet Jul 16, 2025
69ec872
chore: google router mounted
haicomet Jul 16, 2025
26b88a1
Merge pull request #36 from TPP-Team1/config-oauth
tran2106 Jul 16, 2025
1a3feea
refactor: added require jwt + changed const user to let + err->error/…
haicomet Jul 16, 2025
7c6082c
Merge pull request #37 from TPP-Team1/routes-auth
tran2106 Jul 16, 2025
b652f8e
feat-votingRank model
Rend1027 Jul 15, 2025
ba74712
defined VotingRank model
Rend1027 Jul 15, 2025
f25f397
feat- association
Rend1027 Jul 15, 2025
3dd6e84
feat- created Vote data
Rend1027 Jul 15, 2025
a94702b
feat- created voteRank data
Rend1027 Jul 15, 2025
0e7cf4a
fixed- bug in rank data
Rend1027 Jul 15, 2025
ea5cab2
feat- added attributes to VotingRank
Rend1027 Jul 15, 2025
78c546a
feat- added attr to Vote model
Rend1027 Jul 15, 2025
53c26fc
fixed- association bugs
Rend1027 Jul 15, 2025
eb49d4a
create- restricted_poll_access model
Rend1027 Jul 15, 2025
76f7c13
feat- defined restricted_poll_access model
Rend1027 Jul 15, 2025
76a106c
feat- defined associations for restricted
Rend1027 Jul 15, 2025
798b846
feat(api)-poll router
Rend1027 Jul 15, 2025
44fc16f
chore: credentials and callback url added to .env
haicomet Jul 15, 2025
5427bc0
chore: routes/auth created
haicomet Jul 16, 2025
7f02cfb
feat: defined google strategy
haicomet Jul 16, 2025
09602d7
feat: GET /auth/google route added
haicomet Jul 16, 2025
51dffcb
feat: handle callback route + Issue JWT token and redirect to frontend
haicomet Jul 16, 2025
b891697
chore: google router mounted
haicomet Jul 16, 2025
7a7fda2
refactor: added require jwt + changed const user to let + err->error/…
haicomet Jul 16, 2025
64707ac
draft poll creation
Rend1027 Jul 16, 2025
57c8f65
fixed- poll post request
Rend1027 Jul 16, 2025
6742da4
feat- added JWT to poll post request
Rend1027 Jul 16, 2025
13b3cd3
Merge branch 'main' into api-create_poll
Rend1027 Jul 16, 2025
798f41e
fix: resolve Google OAuth startup errors and field name inconsistencies
tran2106 Jul 16, 2025
f8a8c9e
Merge branch 'main' into routes/auth
tran2106 Jul 16, 2025
44ca507
: fix: trying to reosolve conflict
tran2106 Jul 16, 2025
0697da3
fixed- user attribute bugs
Rend1027 Jul 16, 2025
353529c
Merge pull request #39 from TPP-Team1/api-create_poll
Rend1027 Jul 16, 2025
5f93073
fix: standardize auth field names to use 'username' according to new …
tran2106 Jul 16, 2025
f3504a6
fix: update user model to username from userName
tran2106 Jul 16, 2025
7269c10
fix: resolved merge conflict ready to merge
tran2106 Jul 16, 2025
91f0f3d
: fix: log-in/sign-up routes to match username field
tran2106 Jul 16, 2025
3b592b3
Merge pull request #35 from TPP-Team1/routes/sign-up-auth
tran2106 Jul 16, 2025
ecfe8b1
fix: resolve Google OAuth startup errors and field name inconsistencies
tran2106 Jul 16, 2025
4c234e3
fix: resoleved merge con flict
tran2106 Jul 16, 2025
4f7c95d
: fix: resoleved merge conflicts and added .env config
tran2106 Jul 16, 2025
323f7be
refactor- update to deadline attr
Rend1027 Jul 16, 2025
d622b56
fix: added back sign up routes that was lost during merge conflict re…
tran2106 Jul 16, 2025
bff247c
fix: fix route to check both username and emails
tran2106 Jul 16, 2025
cb9df17
Merge pull request #38 from TPP-Team1/routes/auth
tran2106 Jul 16, 2025
49e4bb9
Merge branch 'main' into api-create_poll
Rend1027 Jul 16, 2025
ef4ec87
feat: delete draft poll route made
haicomet Jul 16, 2025
c737a5f
feat: delete is enabled only for poll owner
haicomet Jul 16, 2025
64db6ad
feat: delete is enabled only for drafts
haicomet Jul 16, 2025
4b96e10
feat: deletion confirmation
haicomet Jul 17, 2025
ac76625
Merge pull request #40 from TPP-Team1/delete-draft
tran2106 Jul 17, 2025
8375162
feat- create poll with options
Rend1027 Jul 17, 2025
de2e1ac
feat- added validation
Rend1027 Jul 17, 2025
4c87050
Merge branch 'main' into api-create_poll
Rend1027 Jul 17, 2025
80a9890
Merge pull request #43 from TPP-Team1/api-create_poll
Rend1027 Jul 17, 2025
7abe57d
refactor- cleaned up code
Rend1027 Jul 17, 2025
27cabc0
Merge pull request #44 from TPP-Team1/api-create_poll
Rend1027 Jul 17, 2025
db692d4
feat- get all polls
Rend1027 Jul 17, 2025
587d6d8
feat: slug added to poll model
haicomet Jul 17, 2025
3f67a2e
feat: slug auto-generated upon creation
haicomet Jul 17, 2025
f24e621
feat- Patch complete
Rend1027 Jul 18, 2025
3d42850
Merge pull request #48 from TPP-Team1/api-patch
Rend1027 Jul 18, 2025
8a4c79d
feat: random string generator added for uniqueness/Tran's feedback
haicomet Jul 18, 2025
392dae7
fix: slugifying switch from beforeCreate to beforeValidate + status m…
haicomet Jul 18, 2025
54db59c
fix: resolved merge conflict + returns added to delete route
haicomet Jul 18, 2025
bb74919
feat-Get draft polls complete
Rend1027 Jul 18, 2025
c9086e5
Merge pull request #50 from TPP-Team1/api-fetch_draft
Rend1027 Jul 18, 2025
9904928
Merge pull request #47 from TPP-Team1/models-polls
tran2106 Jul 18, 2025
7278e27
feat: get poll by slug add (includes options)
haicomet Jul 18, 2025
1d7c7ce
refactor-optimized response
Rend1027 Jul 18, 2025
d649ad2
refactor: /draft moved on top of /:slug /Tran's feedback
haicomet Jul 18, 2025
2ac4d2a
Merge pull request #53 from TPP-Team1/get-poll-by-slug
tran2106 Jul 18, 2025
51f08ea
refactor- send sorted response by createdAT
Rend1027 Jul 18, 2025
91f4770
Merge branch 'main' into api-fetch_draft
Rend1027 Jul 18, 2025
1cc1fba
Merge pull request #56 from TPP-Team1/api-fetch_draft
Rend1027 Jul 18, 2025
05ea161
feat- get poll by id complete
Rend1027 Jul 19, 2025
d5822b6
Merge branch 'main' into api-get_poll_by_id
Rend1027 Jul 19, 2025
f9e886a
Merge pull request #57 from TPP-Team1/api-get_poll_by_id
Rend1027 Jul 19, 2025
eab9f60
fixed- change slug endpoint for a more explicit path
Rend1027 Jul 19, 2025
0b090c4
Merge pull request #58 from TPP-Team1/slug
Rend1027 Jul 19, 2025
bd37188
chore: middleware folder created + checkDuplicateVote file added
haicomet Jul 19, 2025
687f816
feat: check if user already voted
haicomet Jul 19, 2025
9ad7c03
feat: check if guest already voted through voterToken
haicomet Jul 19, 2025
5835ea5
feat: IP checking added for guests
haicomet Jul 19, 2025
842ee6b
feat: error handling added to catch block
haicomet Jul 19, 2025
a64e91f
feat: sequelize Op.or operator added to make guest users be checked t…
haicomet Jul 19, 2025
fb4be07
fix: ip retrieval fixed (
haicomet Jul 19, 2025
89afbef
fix: safety check added if no userId available
haicomet Jul 19, 2025
1876d0a
Merge pull request #59 from TPP-Team1/check-duplicate-vote
tran2106 Jul 20, 2025
c5f9655
able to create a vote
Rend1027 Jul 21, 2025
dbcb34c
Merge pull request #62 from TPP-Team1/api/vote
Rend1027 Jul 21, 2025
e0bda78
fix: modify delete route/now logged in user can delete their own publ…
tran2106 Jul 22, 2025
cd6ce01
Merge pull request #72 from TPP-Team1/bug/delete
tran2106 Jul 22, 2025
b0223d0
feat: duplicates routes now added
tran2106 Jul 22, 2025
1adc4b6
Merge pull request #73 from TPP-Team1/api/duplicate
tran2106 Jul 23, 2025
aab60c2
algo complete
Rend1027 Jul 23, 2025
fcc1867
Merge branch 'main' into api/results
Rend1027 Jul 23, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions api/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
const express = require("express");
const router = express.Router();
const pollRouter = require("./polls");
const testDbRouter = require("./test-db");

router.use("/test-db", testDbRouter);
router.use("/polls", pollRouter)

module.exports = router;
Empty file added api/poll.js
Empty file.
Loading