Skip to content
Permalink
Browse files
fixed merge issues
  • Loading branch information
sellers3 committed Nov 26, 2019
1 parent fcb8f39 commit 1e033ea18a8b1a4aeee9433e5ce2c1c5228129dc
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 16 deletions.
@@ -181,7 +181,7 @@ describe('menu', () => {
await page.goto('http://localhost:8080/order/1', { timeout: 30000, waitUntil: 'load' })
await page.goto('http://localhost:8080/order/1', { timeout: 30000, waitUntil: 'load' })

await page.click('input[id=add]')
await page.click('button[name=add]')

await page.waitFor(2000)

Binary file not shown.
@@ -12,7 +12,7 @@ const session = require('koa-session')
/* IMPORT CUSTOM MODULES */
const User = require('./routes/user')
const Menu = require('./routes/menu')
const Order = require('./routers/order')
const Order = require('./routes/order')

const app = new Koa()
const router = new Router()
@@ -29,7 +29,7 @@ const port = process.env.PORT || defaultPort

app.use(User.routes())
app.use(Menu.routes())
app.use(Order.routers())
app.use(Order.routes())


app.use(router.routes())
@@ -18,7 +18,7 @@ router.get('/', async ctx => {
const auth = ctx.session.authorised
const user = await new User(dbUsers)
const authenticated = user.checkAuth(auth)
if(authenticated === true) {
if(authenticated !== true) {
return ctx.redirect('/login?msg=you need to log in')
}
const data = {}
@@ -29,20 +29,8 @@ router.get('/', async ctx => {
}
})

/**
* The user registration page.
*
* @name Register Page
* @route {GET} /register
*/
router.get('/register', async ctx => await ctx.render('register'))

/**
* The script to process new user registrations.
*
* @name Register Script
* @route {POST} /register
*/
router.post('/register', koaBody, async ctx => {
try {
// extract the data from the request

0 comments on commit 1e033ea

Please sign in to comment.