Skip to content

Commit

Permalink
Hot-Fix for Server crashing on init-req. from website
Browse files Browse the repository at this point in the history
  • Loading branch information
n1kPLV committed Jul 27, 2023
1 parent 6d4a647 commit e8385a2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions Server/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ services:
ports: # @Sascha: Je nach Reverse-Proxy Situation hier bitte den Port anpassen:
- "8080:8080"
environment:
# - "NODE_ENV=production" # See: https://expressjs.com/en/guide/error-handling.html#the-default-error-handler
- DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PWD}@postgres:5432/${POSTGRES_DB}?schema=public
- SERVER_PORT=8080
networks:
Expand Down
10 changes: 5 additions & 5 deletions Server/src/routes/init.route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ export class InitRoute {
* The constructor to connect all of the routes with specific functions.
*/
private constructor() {
this.router.get('/app/track/:trackId', this.getForTrack)
this.router.get('/app/tracks', this.getAllTracks)
this.router.put('/app', jsonParser, this.getTrackByPosition)
this.router.get('/app/track/:trackId', (req, res) => {return this.getForTrack(req, res)})
this.router.get('/app/tracks', (req, res) => {return this.getAllTracks(req, res)})
this.router.put('/app', jsonParser, (req, res) => {return this.getTrackByPosition(req, res)})

this.router.get('/website', authenticateJWT, this.getAllTracks)
this.router.get('/website/:trackId', authenticateJWT, this.getForTrackWebsite)
this.router.get('/website', authenticateJWT, (req, res) => {return this.getAllTracks(req, res)})
this.router.get('/website/:trackId', authenticateJWT, (req, res) => {return this.getForTrackWebsite(req, res)})
}

/**
Expand Down

0 comments on commit e8385a2

Please sign in to comment.