Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
9 changes: 9 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

PORT=3000
DB_URL=postgres://postgres:Test1234@localhost:5432/postgres?schema=public
CLIENT_URL=http://localhost:5173
JWT_ACCESS_SECRET=00000000-0000-0000-0000-000000000000
JWT_REFRESH_SECRET=00000000-0000-0000-0000-000000000000

SMTP_USER=kramarchuk.marina.fs@gmail.com
SMTP_PASS=icrjaznyvdbcwnoc
9 changes: 6 additions & 3 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
module.exports = {
extends: '@mate-academy/eslint-config',
parser: '@typescript-eslint/parser',
plugins: ['jest', '@typescript-eslint'],
env: {
jest: true
jest: true,
},
rules: {
'no-proto': 0
'no-proto': 0,
'no-unused-vars': 'off',
'no-undef': 'off',
Comment on lines +10 to +11

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration doesn't accept name field as required by checklist item #1. It only extracts email and password from req.body, and usersRepository.create() derives name from email. The registration must accept and store the name field from user input.

Comment on lines 1 to +11

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No authentication guards for guest-only routes (register, login, password reset). These should redirect authenticated users away as required by checklist items #2, #6, #9, #14.

},
plugins: ['jest']
};
23 changes: 23 additions & 0 deletions .github/workflows/test.yml-template
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Test

on:
pull_request:
branches: [ master ]

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [20.x]

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm test
4 changes: 0 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,3 @@ node_modules

# MacOS
.DS_Store

# env files
*.env
.env*
Loading
Loading