Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
5874560
Tweaked CICD, removed husky, removed deployment
dogezen Oct 21, 2024
daf1910
merged from upstream
dogezen Oct 24, 2024
2326cca
initialCommit
Oct 28, 2024
b9d122d
first commit
Ingeborgausteid Oct 28, 2024
354ac45
First commit
tuvaea Oct 28, 2024
f0cc815
adds password validation
Ingeborgausteid Oct 29, 2024
b1e5ec3
Updated openapi.yml with profileImage
tuvaea Oct 29, 2024
2034c13
Added profileImage to prisma schema and seed.js
tuvaea Oct 29, 2024
9c21e2b
Removed failed migration
tuvaea Oct 29, 2024
3f8c12c
added user patch functionality
tvaltn Oct 29, 2024
dc3132b
added relevant fields, changed class structure to match newly created…
Oct 29, 2024
dbc91b2
adds validateUser function in middleware\user.js with the password va…
Ingeborgausteid Oct 29, 2024
04b4a9a
adds in routes\user.js instead of in controllers\user.js
Ingeborgausteid Oct 29, 2024
6aa6abd
added logged in user routing
tvaltn Oct 29, 2024
647caa2
Added profileImage to user.js domain
tuvaea Oct 29, 2024
86ef6bb
fixed role format from request body
tvaltn Oct 29, 2024
b56e095
fixed order of seeding data
Oct 29, 2024
52145ad
adds 400 response to /users in openapi.yaml
Ingeborgausteid Oct 29, 2024
3007118
adds updated openapi.yml with 400 response to patch in /users
Ingeborgausteid Oct 29, 2024
e0040d0
Merge pull request #24 from boolean-uk/add-password-validation
Brandsegg Oct 29, 2024
d4ac66c
moved request modification to middleware
tvaltn Oct 29, 2024
e13ed2e
Merge branch 'main' into 4-update-the-userprofile-table-with-relevant…
JHalvor Oct 29, 2024
9e0a80a
Merge pull request #26 from boolean-uk/4-update-the-userprofile-table…
Brandsegg Oct 29, 2024
5827558
Merge branch 'main' into 23-implement-update-user-functionality-in-us…
tvaltn Oct 29, 2024
b624f5a
added new user fields to update endpoint
tvaltn Oct 29, 2024
5db6a8a
Merge pull request #27 from boolean-uk/23-implement-update-user-funct…
Brandsegg Oct 29, 2024
7d9aced
Added email-validation in the middleware/user.js file.
thomamn Oct 29, 2024
711bdb7
Merge branch 'main' of github.com:boolean-uk/team-dev-server-ex-2410-…
tuvaea Oct 30, 2024
fd865b3
Resolved merge conflict
tuvaea Oct 30, 2024
e83b887
Merge pull request #25 from boolean-uk/11-update-the-profile-table-wi…
Brandsegg Oct 30, 2024
58cec2f
Merge branch 'main' of github.com:boolean-uk/team-dev-server-ex-2410-…
thomamn Oct 30, 2024
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
4 changes: 0 additions & 4 deletions .dockerignore

This file was deleted.

5 changes: 0 additions & 5 deletions .env.example

This file was deleted.

5 changes: 0 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
name: CI
on: [push, pull_request]
env:
DATABASE_URL: ${{ secrets.DATABASE_URL }}
JWT_TOKEN: ${{ secrets.JWT_TOKEN }}
JWT_EXPIRY: ${{ secrets.JWT_EXPIRY }}
jobs:
test:
runs-on: ubuntu-latest
Expand All @@ -14,4 +10,3 @@ jobs:
node-version: 'lts/*'
- run: npm ci
- run: npx eslint src
- run: npx prisma migrate reset --force --skip-seed
21 changes: 0 additions & 21 deletions .github/workflows/deploy.yml

This file was deleted.

4 changes: 0 additions & 4 deletions .husky/pre-commit

This file was deleted.

36 changes: 0 additions & 36 deletions Dockerfile

This file was deleted.

115 changes: 104 additions & 11 deletions docs/openapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ openapi: 3.0.3
info:
title: Team Dev Server API
description: |-
version: 1.0
version: "1.0"

servers:
- url: http://localhost:4000/
- url: "http://localhost:4000/"
tags:
- name: user
- name: post
Expand All @@ -32,6 +32,12 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/CreatedUser'
'400':
description: Invalid email/password supplied
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
get:
tags:
- user
Expand Down Expand Up @@ -85,10 +91,8 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/loginRes'

'400':
description: Invalid username/password supplied

/users/{id}:
get:
tags:
Expand Down Expand Up @@ -117,7 +121,6 @@ paths:
type: string
data:
$ref: '#/components/schemas/User'

'400':
description: fail
content:
Expand Down Expand Up @@ -164,6 +167,12 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/Error'
'400':
description: Invalid email/password supplied
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/posts:
post:
tags:
Expand Down Expand Up @@ -314,10 +323,10 @@ components:
type: integer
createdAt:
type: string
format: string
format: date-time
updatedAt:
type: string
format: string
format: date-time

AllUsers:
type: object
Expand Down Expand Up @@ -351,6 +360,20 @@ components:
type: string
githubUrl:
type: string
username:
type: string
mobile:
type: string
specialism:
type: string
startDate:
type: string
format: date-time
endDate:
type: string
format: date-time
profileImage:
type: string

CreateUser:
type: object
Expand All @@ -365,8 +388,22 @@ components:
type: string
githubUrl:
type: string
username:
type: string
mobile:
type: string
specialism:
type: string
startDate:
type: string
format: date-time
endDate:
type: string
format: date-time
password:
type: string
profileImage:
type: string

UpdateUser:
type: object
Expand All @@ -387,6 +424,20 @@ components:
type: string
githubUrl:
type: string
username:
type: string
mobile:
type: string
specialism:
type: string
startDate:
type: string
format: date-time
endDate:
type: string
format: date-time
profileImage:
type: string

Posts:
type: object
Expand All @@ -407,10 +458,10 @@ components:
type: string
createdAt:
type: string
format: string
format: date-time
updatedAt:
type: string
format: string
format: date-time
author:
type: object
properties:
Expand All @@ -428,9 +479,21 @@ components:
type: string
githubUrl:
type: string
profileImageUrl:
username:
type: string
mobile:
type: string

specialism:
type: string
startDate:
type: string
format: date-time
endDate:
type: string
format: date-time
profileImage:
type: string

CreatedUser:
type: object
properties:
Expand All @@ -457,6 +520,21 @@ components:
type: string
githubUrl:
type: string
username:
type: string
mobile:
type: string
specialism:
type: string
startDate:
type: string
format: date-time
endDate:
type: string
format: date-time
profileImage:
type: string

login:
type: object
properties:
Expand Down Expand Up @@ -492,6 +570,21 @@ components:
type: string
githubUrl:
type: string
username:
type: string
mobile:
type: string
specialism:
type: string
startDate:
type: string
format: date-time
endDate:
type: string
format: date-time
profileImage:
type: string

Error:
type: object
properties:
Expand Down
42 changes: 0 additions & 42 deletions fly.toml

This file was deleted.

2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
"scripts": {
"start": "node src/index.js",
"dev": "nodemon src/index.js",
"prepare": "husky install",
"db-reset": "prisma migrate reset",
"lint": "eslint .",
"lint:fix": "eslint --fix",
Expand Down Expand Up @@ -36,7 +35,6 @@
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-promise": "^5.1.0",
"husky": "^7.0.4",
"nodemon": "^2.0.15",
"prettier": "^2.6.2",
"prisma": "^3.12.0"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
-- AlterTable
ALTER TABLE "Profile" ADD COLUMN "endDate" TIMESTAMP(3),
ADD COLUMN "mobile" TEXT NOT NULL DEFAULT E'',
ADD COLUMN "specialism" TEXT NOT NULL DEFAULT E'',
ADD COLUMN "startDate" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
ADD COLUMN "username" TEXT NOT NULL DEFAULT E'';
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-- AlterTable
ALTER TABLE "Profile" ADD COLUMN "profileImage" TEXT;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
-- This is an empty migration.
6 changes: 6 additions & 0 deletions prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ model Profile {
lastName String
bio String?
githubUrl String?
username String @default("")
mobile String @default("")
specialism String @default("")
startDate DateTime @default(now())
endDate DateTime?
profileImage String?
}

model Cohort {
Expand Down
Loading