Skip to content
Permalink
Browse files
Code Clean Up
Linter reported a number of issues with the code.

These have now been resolved.
  • Loading branch information
aa7401 committed Oct 14, 2019
1 parent c00b0b1 commit 74e4c5726b0503e40c99964790b20cdce478c8e1
Show file tree
Hide file tree
Showing 15 changed files with 2 additions and 288 deletions.

This file was deleted.

This file was deleted.

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -5,17 +5,13 @@
'use strict'

/* MODULE IMPORTS */
const bcrypt = require('bcrypt-promise')
const Koa = require('koa')
const Router = require('koa-router')
const views = require('koa-views')
const staticDir = require('koa-static')
const bodyParser = require('koa-bodyparser')
const koaBody = require('koa-body')({multipart: true, uploadDir: '.'})
const session = require('koa-session')
const sqlite = require('sqlite-async')
const fs = require('fs-extra')
const mime = require('mime-types')
//const jimp = require('jimp')

/* IMPORT CUSTOM MODULES */
@@ -34,7 +30,6 @@ app.use(views(`${__dirname}/views`, { extension: 'handlebars' }, {map: { handleb
const defaultPort = 8080
const port = process.env.PORT || defaultPort
const dbName = 'website.db'
const saltRounds = 10

/**
* The secure home page.
@@ -73,7 +68,6 @@ router.post('/register', koaBody, async ctx => {
// extract the data from the request
const body = ctx.request.body
console.log(body)
const {path, type} = ctx.request.files.avatar
// call the functions in the module
const user = await new User(dbName)
await user.register(body.user, body.pass)
@@ -2,7 +2,7 @@
'use strict'

const bcrypt = require('bcrypt-promise')
const fs = require('fs-extra')
// const fs = require('fs-extra')
const mime = require('mime-types')
const sqlite = require('sqlite-async')
const saltRounds = 10
@@ -57,4 +57,4 @@ module.exports = class User {
}
}

}
}

0 comments on commit 74e4c57

Please sign in to comment.