-Login
--Password reset
-OrderMember
--Create, Delete, Get, (All secured to Admin roles)
--Edit (Secured to record owner changes only)
-Polling
--Create, Edit, Delete -> Name of Polling, Polling dates
-Candidate
--Create, Edit, Delete
-Polling Order
--Create Edit, Delete
-Polling-Note-Vote
--Creates notes and votes associated with a specific candidate and polling,
which will be attributed to the contributor
-Polling-Summary
--Pulls data for each poll, and lists all candidates and thier data
-Polling-Candidates
-- Add, Remove
-Candidate-External-Notes
--Create, Edit, Delete -> this would be for data added outside of a polling for a candidate
1. Have access to a Postgres database
2. Run PollingBackup.sql on database
3. Update src/common/env/.development.env with login info for postgres database as well as email host info
4. Update src/auth/constants.ts with a new secret prior to going to production.$ npm install# development
$ npm run start
# watch mode
$ npm run start:dev
# production mode
$ npm run start:prod
If you use Postman ( https://www.postman.com/downloads/ ) you can use the
Polling.postman_collection.json file which will have the most up to date endpoints listed.Tests use Jest.
# Run all tests once
npm test -- --watchAll=false
# Run tests in watch mode (reruns on file changes)
npm test
# Run with coverage report
npm run test:cov- Module path aliases (
src/...) are resolved viamoduleNameMapperinpackage.jsonJest config. - Repository mocks require both
getRepositoryToken(Entity)providers when a service depends on multiple entities (e.g.MemberServiceneedsMemberandPollingOrderrepositories). - DTOs use
class-validator—@IsNumber(),@IsString(),@IsNotEmpty()decorators are tested viaValidationPipein e2e tests.