Skip to content

Commit

Permalink
fix deploy webhook router
Browse files Browse the repository at this point in the history
  • Loading branch information
joaomede committed Feb 11, 2020
1 parent 883e5cb commit a7ec957
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
7 changes: 0 additions & 7 deletions api/routes/Router.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { Router } from 'express'
import cDeploy from '../controllers/Deploy'
import cContainer from '../controllers/Container'
import cDocker from '../controllers/Docker'
import CheckJwt from '../middlewares/CheckJwt'
const routes = Router()

Expand Down Expand Up @@ -49,10 +48,4 @@ routes.put(
cContainer.update
)

// WebHook
routes.post(
'/api/deploy/webhook/:secret',
cDocker.deploy
)

export default routes
15 changes: 11 additions & 4 deletions api/routes/RouterAuth.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
import c from '../controllers/Auth'
import cAuth from '../controllers/Auth'
import validate from '../utils/Validation'
import { Router } from 'express'
import cDocker from '../controllers/Docker'

const routes = Router()

routes.post('/api/auth/login', validate.login, c.auth)
routes.post('/api/auth/register', validate.register, c.register)
routes.put('/api/auth/changepassword', c.changePassword)
// WebHook
routes.post(
'/api/deploy/webhook/:secret',
cDocker.deploy
)

routes.post('/api/auth/login', validate.login, cAuth.auth)
routes.post('/api/auth/register', validate.register, cAuth.register)
routes.put('/api/auth/changepassword', cAuth.changePassword)

export default routes

0 comments on commit a7ec957

Please sign in to comment.