Permalink
Browse files

Migrate JavaScript code to Standard 12.x code style rules

  • Loading branch information...
bkimminich committed Aug 29, 2018
1 parent 07b97be commit 811cb12de66343f07e1f9ace07dcb5f5bd5ce54d
Showing with 572 additions and 572 deletions.
  1. +2 −2 app/js/controllers/BasketController.js
  2. +1 −1 app/js/controllers/ChangePasswordController.js
  3. +1 −1 app/js/controllers/ComplaintController.js
  4. +1 −1 app/js/controllers/ForgotPasswordController.js
  5. +30 −30 app/js/controllers/LanguageController.js
  6. +1 −1 app/js/controllers/OAuthController.js
  7. +1 −1 app/js/controllers/ProductReviewEditController.js
  8. +1 −1 app/js/controllers/RegisterController.js
  9. +1 −1 app/js/controllers/SearchController.js
  10. +4 −4 app/js/controllers/SearchResultController.js
  11. +1 −1 app/js/controllers/TrackOrderController.js
  12. +6 −6 app/js/routes.js
  13. +4 −4 lib/insecurity.js
  14. +1 −1 lib/startup/registerWebsocketEvents.js
  15. +1 −1 lib/utils.js
  16. +2 −2 models/basket.js
  17. +1 −1 models/basketitem.js
  18. +1 −1 models/captcha.js
  19. +1 −1 models/challenge.js
  20. +2 −2 models/complaint.js
  21. +2 −2 models/feedback.js
  22. +2 −2 models/product.js
  23. +2 −2 models/recycle.js
  24. +2 −2 models/securityAnswer.js
  25. +1 −1 models/securityQuestion.js
  26. +1 −1 models/user.js
  27. +1 −1 package.json
  28. +1 −1 routes/angular.js
  29. +1 −1 routes/b2bOrder.js
  30. +1 −1 routes/changePassword.js
  31. +1 −1 routes/coupon.js
  32. +1 −1 routes/createProductReviews.js
  33. +1 −1 routes/currentUser.js
  34. +1 −1 routes/fileServer.js
  35. +1 −1 routes/keyServer.js
  36. +1 −1 routes/order.js
  37. +1 −1 routes/redirect.js
  38. +1 −1 routes/repeatNotification.js
  39. +1 −1 routes/resetPassword.js
  40. +1 −1 routes/restoreProgress.js
  41. +1 −1 routes/search.js
  42. +1 −1 routes/securityQuestion.js
  43. +1 −1 routes/showProductReviews.js
  44. +1 −1 routes/trackOrder.js
  45. +1 −1 routes/updateProductReviews.js
  46. +32 −32 routes/verify.js
  47. +4 −4 server.js
  48. +10 −10 test/api/basketApiSpec.js
  49. +3 −3 test/api/basketItemApiSpec.js
  50. +7 −7 test/api/feedbackApiSpec.js
  51. +1 −1 test/api/fileUploadSpec.js
  52. +4 −4 test/api/passwordApiSpec.js
  53. +1 −1 test/api/productReviewApiSpec.js
  54. +10 −10 test/api/searchApiSpec.js
  55. +1 −1 test/api/securityAnswerApiSpec.js
  56. +1 −1 test/api/userApiSpec.js
  57. +22 −22 test/client/appSpec.js
  58. +4 −4 test/client/controllers/aboutControllerSpec.js
  59. +67 −67 test/client/controllers/basketControllerSpec.js
  60. +26 −26 test/client/controllers/challengeControllerSpec.js
  61. +3 −3 test/client/controllers/challengeSolvedNotificationControllerSpec.js
  62. +3 −3 test/client/controllers/changePasswordControllerSpec.js
  63. +30 −30 test/client/controllers/complaintControllerSpec.js
  64. +14 −14 test/client/controllers/contactControllerSpec.js
  65. +12 −12 test/client/controllers/feedbackControllerSpec.js
  66. +3 −3 test/client/controllers/forgotPasswordControllerSpec.js
  67. +7 −7 test/client/controllers/loginControllerSpec.js
  68. +1 −1 test/client/controllers/loginGoogleOAuthSpec.js
  69. +3 −3 test/client/controllers/loginRememberMeSpec.js
  70. +11 −11 test/client/controllers/navbarControllerSpec.js
  71. +4 −4 test/client/controllers/oauthControllerSpec.js
  72. +9 −9 test/client/controllers/productDetailsControllerSpec.js
  73. +1 −1 test/client/controllers/productReviewEditControllerSpec.js
  74. +9 −9 test/client/controllers/qrCodeModalsSpec.js
  75. +24 −24 test/client/controllers/recycleControllerSpec.js
  76. +3 −3 test/client/controllers/registerControllerSpec.js
  77. +2 −2 test/client/controllers/searchControllerSpec.js
  78. +54 −54 test/client/controllers/searchResultControllerSpec.js
  79. +2 −2 test/client/controllers/serverStartedNotificationControllerSpec.js
  80. +1 −1 test/client/controllers/trackResultControllerSpec.js
  81. +6 −6 test/client/controllers/userControllerSpec.js
  82. +2 −2 test/client/controllers/userDetailsControllerSpec.js
  83. +3 −3 test/client/services/feedbackServiceSpec.js
  84. +2 −2 test/client/services/productReviewServiceSpec.js
  85. +2 −2 test/client/services/productServiceSpec.js
  86. +1 −1 test/client/services/securityAnswerServiceSpec.js
  87. +7 −7 test/client/services/userServiceSpec.js
  88. +3 −3 test/e2e/administrationSpec.js
  89. +3 −3 test/e2e/b2bOrderSpec.js
  90. +5 −5 test/e2e/basketSpec.js
  91. +3 −3 test/e2e/changePasswordSpec.js
  92. +6 −6 test/e2e/directAccessSpec.js
  93. +2 −2 test/e2e/forgedJwtSpec.js
  94. +4 −4 test/e2e/forgotPasswordSpec.js
  95. +8 −8 test/e2e/loginSpec.js
  96. +1 −1 test/e2e/noSqlSpec.js
  97. +6 −6 test/e2e/publicFtpSpec.js
  98. +2 −2 test/e2e/redirectSpec.js
  99. +2 −2 test/e2e/registerSpec.js
  100. +3 −3 test/e2e/restApiSpec.js
  101. +2 −2 test/e2e/scoreBoardSpec.js
  102. +4 −4 test/e2e/searchSpec.js
  103. +1 −1 test/e2e/tokenSaleSpec.js
  104. +1 −1 test/e2e/trackingOrderSpec.js
  105. +2 −2 test/server/challengeCountryMapping.js
  106. +1 −1 test/server/currentUserSpec.js
  107. +9 −9 test/server/insecuritySpec.js
@@ -48,7 +48,7 @@ angular.module('juiceShop').controller('BasketController', [
$scope.applyCoupon = function () {
basketService.applyCoupon($window.sessionStorage.bid, encodeURIComponent($scope.coupon)).then(function (data) {
$scope.coupon = undefined
$translate('DISCOUNT_APPLIED', {discount: data}).then(function (discountApplied) {
$translate('DISCOUNT_APPLIED', { discount: data }).then(function (discountApplied) {
$scope.confirmation = discountApplied
}, function (translationId) {
$scope.confirmation = translationId
@@ -82,7 +82,7 @@ angular.module('juiceShop').controller('BasketController', [
function addToQuantity (id, value) {
basketService.get(id).then(function (basketItem) {
var newQuantity = basketItem.quantity + value
basketService.put(id, {quantity: newQuantity < 1 ? 1 : newQuantity}).then(function () {
basketService.put(id, { quantity: newQuantity < 1 ? 1 : newQuantity }).then(function () {
load()
}).catch(function (err) {
console.log(err)
@@ -6,7 +6,7 @@ angular.module('juiceShop').controller('ChangePasswordController', [
'use strict'
$scope.changePassword = function () {
userService.changePassword({current: $scope.currentPassword, new: $scope.newPassword, repeat: $scope.newPasswordRepeat}).then(function () {
userService.changePassword({ current: $scope.currentPassword, new: $scope.newPassword, repeat: $scope.newPasswordRepeat }).then(function () {
$scope.error = undefined
$scope.confirmation = 'Your password was successfully changed.'
resetForm()
@@ -36,7 +36,7 @@ angular.module('juiceShop').controller('ComplaintController', [
$scope.upload = function (file) {
Upload.upload({
url: '/file-upload',
data: {file: file}
data: { file: file }
}).then(function (req) {
$scope.complaint.file = req.config.data.file.name
saveComplaint()
@@ -16,7 +16,7 @@ angular.module('juiceShop').controller('ForgotPasswordController', [
}
$scope.resetPassword = function () {
userService.resetPassword({email: $scope.email, answer: $scope.securityAnswer, new: $scope.newPassword, repeat: $scope.newPasswordRepeat}).then(function () {
userService.resetPassword({ email: $scope.email, answer: $scope.securityAnswer, new: $scope.newPassword, repeat: $scope.newPasswordRepeat }).then(function () {
$scope.error = undefined
$scope.confirmation = 'Your password was successfully changed.'
resetForm()
@@ -18,34 +18,34 @@ angular.module('juiceShop').controller('LanguageController', [
}])
var languages = [
{key: 'ar_SA', icon: 'ae', lang: 'عربى'},
{key: 'cs_CZ', icon: 'cz', lang: 'Česky', isFlask: true},
{key: 'da_DK', icon: 'dk', lang: 'Dansk', isFlask: true},
{key: 'de_DE', icon: 'de', lang: 'Deutsch'},
{key: 'el_GR', icon: 'gr', lang: 'Ελληνικά', isFlask: true},
{key: 'es_ES', icon: 'es', lang: 'Español', isFlask: true},
{key: 'et_EE', icon: 'ee', lang: 'Eesti'},
{key: 'fi_FI', icon: 'fi', lang: 'Suomalainen', isFlask: true},
{key: 'fr_FR', icon: 'fr', lang: 'Français'},
{key: 'he_IL', icon: 'il', lang: 'עברי'},
{key: 'hi_IN', icon: 'in', lang: 'हिंदी'},
{key: 'hu_HU', icon: 'hu', lang: 'Magyar', isFlask: true},
{key: 'id_ID', icon: 'id', lang: 'Bahasa Indonesia'},
{key: 'it_IT', icon: 'it', lang: 'Italiano'},
{key: 'ja_JP', icon: 'jp', lang: '日本の'},
{key: 'lt_LT', icon: 'lt', lang: 'Lietuviešu', isFlask: true},
{key: 'lv_LV', icon: 'lv', lang: 'Latvijas', isFlask: true},
{key: 'my_MM', icon: 'mm', lang: 'ျမန္မာ', isFlask: true},
{key: 'nl_NL', icon: 'nl', lang: 'Nederlands'},
{key: 'no_NO', icon: 'no', lang: 'Norsk'},
{key: 'pl_PL', icon: 'pl', lang: 'Język Polski'},
{key: 'pt_PT', icon: 'pt', lang: 'Português', isFlask: true},
{key: 'pt_BR', icon: 'br', lang: 'Português (Brasil)'},
{key: 'ro_RO', icon: 'ro', lang: 'Românesc'},
{key: 'ru_RU', icon: 'ru', lang: 'Pусский', isFlask: true},
{key: 'sv_SE', icon: 'se', lang: 'Svenska'},
{key: 'tr_TR', icon: 'tr', lang: 'Türkçe'},
{key: 'ur_PK', icon: 'pk', lang: 'اردو'},
{key: 'zh_CN', icon: 'cn', lang: '中国'},
{key: 'zh_HK', icon: 'hk', lang: '繁體中文'}
{ key: 'ar_SA', icon: 'ae', lang: 'عربى' },
{ key: 'cs_CZ', icon: 'cz', lang: 'Česky', isFlask: true },
{ key: 'da_DK', icon: 'dk', lang: 'Dansk', isFlask: true },
{ key: 'de_DE', icon: 'de', lang: 'Deutsch' },
{ key: 'el_GR', icon: 'gr', lang: 'Ελληνικά', isFlask: true },
{ key: 'es_ES', icon: 'es', lang: 'Español', isFlask: true },
{ key: 'et_EE', icon: 'ee', lang: 'Eesti' },
{ key: 'fi_FI', icon: 'fi', lang: 'Suomalainen', isFlask: true },
{ key: 'fr_FR', icon: 'fr', lang: 'Français' },
{ key: 'he_IL', icon: 'il', lang: 'עברי' },
{ key: 'hi_IN', icon: 'in', lang: 'हिंदी' },
{ key: 'hu_HU', icon: 'hu', lang: 'Magyar', isFlask: true },
{ key: 'id_ID', icon: 'id', lang: 'Bahasa Indonesia' },
{ key: 'it_IT', icon: 'it', lang: 'Italiano' },
{ key: 'ja_JP', icon: 'jp', lang: '日本の' },
{ key: 'lt_LT', icon: 'lt', lang: 'Lietuviešu', isFlask: true },
{ key: 'lv_LV', icon: 'lv', lang: 'Latvijas', isFlask: true },
{ key: 'my_MM', icon: 'mm', lang: 'ျမန္မာ', isFlask: true },
{ key: 'nl_NL', icon: 'nl', lang: 'Nederlands' },
{ key: 'no_NO', icon: 'no', lang: 'Norsk' },
{ key: 'pl_PL', icon: 'pl', lang: 'Język Polski' },
{ key: 'pt_PT', icon: 'pt', lang: 'Português', isFlask: true },
{ key: 'pt_BR', icon: 'br', lang: 'Português (Brasil)' },
{ key: 'ro_RO', icon: 'ro', lang: 'Românesc' },
{ key: 'ru_RU', icon: 'ru', lang: 'Pусский', isFlask: true },
{ key: 'sv_SE', icon: 'se', lang: 'Svenska' },
{ key: 'tr_TR', icon: 'tr', lang: 'Türkçe' },
{ key: 'ur_PK', icon: 'pk', lang: 'اردو' },
{ key: 'zh_CN', icon: 'cn', lang: '中国' },
{ key: 'zh_HK', icon: 'hk', lang: '繁體中文' }
]
@@ -9,7 +9,7 @@ angular.module('juiceShop').controller('OAuthController', [
'use strict'
userService.oauthLogin(parseRedirectUrlParams()['access_token']).then(function (profile) {
userService.save({email: profile.email, password: $base64.encode(profile.email)}).then(function () {
userService.save({ email: profile.email, password: $base64.encode(profile.email) }).then(function () {
login(profile)
}).catch(function () { // eslint-disable-line handle-callback-err
login(profile)
@@ -10,7 +10,7 @@ angular.module('juiceShop').controller('ProductReviewEditController', [
$scope.message = review.message
$scope.editReview = function () {
productReviewService.patch({id: $scope.id, message: $scope.message}).then(function () {
productReviewService.patch({ id: $scope.id, message: $scope.message }).then(function () {
$uibModalInstance.close($scope.message)
}).catch(function (err) {
console.log(err)
@@ -15,7 +15,7 @@ angular.module('juiceShop').controller('RegisterController', [
$scope.save = function () {
userService.save($scope.user).then(function (user) {
securityAnswerService.save({UserId: user.id, answer: $scope.user.securityAnswer, SecurityQuestionId: $scope.user.securityQuestion.id}).then(function () {
securityAnswerService.save({ UserId: user.id, answer: $scope.user.securityAnswer, SecurityQuestionId: $scope.user.securityQuestion.id }).then(function () {
$scope.user = {}
$location.path('/login')
})
@@ -5,6 +5,6 @@ angular.module('juiceShop').controller('SearchController', [
'use strict'
$scope.search = function () {
$location.path('/search').search({q: $scope.searchQuery || ''})
$location.path('/search').search({ q: $scope.searchQuery || '' })
}
}])
@@ -32,9 +32,9 @@ angular.module('juiceShop').controller('SearchResultController', [
found = true
basketService.get(productsInBasket[i].BasketItem.id).then(function (existingBasketItem) {
var newQuantity = existingBasketItem.quantity + 1
basketService.put(existingBasketItem.id, {quantity: newQuantity}).then(function (updatedBasketItem) {
basketService.put(existingBasketItem.id, { quantity: newQuantity }).then(function (updatedBasketItem) {
productService.get(updatedBasketItem.ProductId).then(function (product) {
$translate('BASKET_ADD_SAME_PRODUCT', {product: product.name}).then(function (basketAddSameProduct) {
$translate('BASKET_ADD_SAME_PRODUCT', { product: product.name }).then(function (basketAddSameProduct) {
$scope.confirmation = basketAddSameProduct
}, function (translationId) {
$scope.confirmation = translationId
@@ -52,9 +52,9 @@ angular.module('juiceShop').controller('SearchResultController', [
}
}
if (!found) {
basketService.save({ProductId: id, BasketId: $window.sessionStorage.bid, quantity: 1}).then(function (newBasketItem) {
basketService.save({ ProductId: id, BasketId: $window.sessionStorage.bid, quantity: 1 }).then(function (newBasketItem) {
productService.get(newBasketItem.ProductId).then(function (product) {
$translate('BASKET_ADD_PRODUCT', {product: product.name}).then(function (basketAddProduct) {
$translate('BASKET_ADD_PRODUCT', { product: product.name }).then(function (basketAddProduct) {
$scope.confirmation = basketAddProduct
}, function (translationId) {
$scope.confirmation = translationId
@@ -5,6 +5,6 @@ angular.module('juiceShop').controller('TrackOrderController', [
'use strict'
$scope.save = function () {
$location.path('/track-result').search({id: $scope.orderId || ''})
$location.path('/track-result').search({ id: $scope.orderId || '' })
}
}])
View
@@ -88,12 +88,12 @@ angular.module('juiceShop').config(['$routeProvider', function ($routeProvider)
return String.fromCharCode(C - D - 45 - A)
}).join('')
})(25, 184, 174, 179, 182, 186) + (36669).toString(36).toLowerCase() + (function () {
var T = Array.prototype.slice.call(arguments)
var M = T.shift()
return T.reverse().map(function (m, H) {
return String.fromCharCode(m - M - 24 - H)
}).join('')
})(13, 144, 87, 152, 139, 144, 83, 138) + (10).toString(36).toLowerCase(), {
var T = Array.prototype.slice.call(arguments)
var M = T.shift()
return T.reverse().map(function (m, H) {
return String.fromCharCode(m - M - 24 - H)
}).join('')
})(13, 144, 87, 152, 139, 144, 83, 138) + (10).toString(36).toLowerCase(), {
templateUrl: '\x76\x69\x65\x77\x73\x2F\x54\x6F\x6B\x65\x6E\x53\x61\x6C\x65\x2E\x68\x74\x6D\x6C',
controller: '\x54\x6F\x6B\x65\x6E\x53\x61\x6C\x65\x43\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72'
})
View
@@ -22,8 +22,8 @@ exports.cutOffPoisonNullByte = str => {
return str
}
exports.isAuthorized = () => expressJwt({secret: this.publicKey})
exports.denyAll = () => expressJwt({secret: '' + Math.random()})
exports.isAuthorized = () => expressJwt({ secret: this.publicKey })
exports.denyAll = () => expressJwt({ secret: '' + Math.random() })
exports.authorize = (user = {}) => jwt.sign(user, privateKey, { expiresIn: 3600 * 5, algorithm: 'RS256' })
exports.sanitizeHtml = html => sanitizeHtml(html)
@@ -47,7 +47,7 @@ exports.authenticatedUsers = {
}
}
exports.userEmailFrom = ({headers}) => {
exports.userEmailFrom = ({ headers }) => {
return headers ? headers['x-user-email'] : undefined
}
@@ -95,7 +95,7 @@ exports.isRedirectAllowed = url => {
}
exports.verifyCaptcha = () => (req, res, next) => {
models.Captcha.findOne({ where: {captchaId: req.body.captchaId} }).then(captcha => {
models.Captcha.findOne({ where: { captchaId: req.body.captchaId } }).then(captcha => {
if (req.body.captcha === captcha.dataValues.answer) {
next()
} else {
@@ -16,7 +16,7 @@ const registerWebsocketEvents = (server) => {
})
socket.on('notification received', data => {
const i = notifications.findIndex(({flag}) => flag === data)
const i = notifications.findIndex(({ flag }) => flag === data)
if (i > -1) {
notifications.splice(i, 1)
}
View
@@ -146,7 +146,7 @@ exports.downloadToFile = (url, dest) => {
})
}
exports.jwtFrom = ({headers}) => {
exports.jwtFrom = ({ headers }) => {
if (headers && headers.authorization) {
const parts = headers.authorization.split(' ')
if (parts.length === 2) {
View
@@ -1,10 +1,10 @@
/* jslint node: true */
module.exports = (sequelize, {STRING}) => {
module.exports = (sequelize, { STRING }) => {
const Basket = sequelize.define('Basket', {
coupon: STRING
})
Basket.associate = ({User, Product, BasketItem}) => {
Basket.associate = ({ User, Product, BasketItem }) => {
Basket.belongsTo(User, { constraints: true, foreignKeyConstraint: true })
Basket.belongsToMany(Product, { through: BasketItem })
}
View
@@ -1,5 +1,5 @@
/* jslint node: true */
module.exports = (sequelize, {INTEGER}) => {
module.exports = (sequelize, { INTEGER }) => {
const BasketItem = sequelize.define('BasketItem', {
id: {
type: INTEGER,
View
@@ -1,4 +1,4 @@
module.exports = (sequelize, {INTEGER, STRING}) => {
module.exports = (sequelize, { INTEGER, STRING }) => {
const Challenge = sequelize.define('Captcha', {
captchaId: INTEGER,
captcha: STRING,
View
@@ -1,5 +1,5 @@
/* jslint node: true */
module.exports = (sequelize, {STRING, INTEGER, BOOLEAN}) => {
module.exports = (sequelize, { STRING, INTEGER, BOOLEAN }) => {
const Challenge = sequelize.define('Challenge', {
key: STRING,
name: STRING,
View
@@ -1,11 +1,11 @@
/* jslint node: true */
module.exports = (sequelize, {STRING}) => {
module.exports = (sequelize, { STRING }) => {
const Complaint = sequelize.define('Complaint', {
message: STRING,
file: STRING
})
Complaint.associate = ({User}) => {
Complaint.associate = ({ User }) => {
Complaint.belongsTo(User, { constraints: true, foreignKeyConstraint: true })
}
View
@@ -3,7 +3,7 @@ const insecurity = require('../lib/insecurity')
const utils = require('../lib/utils')
const challenges = require('../data/datacache').challenges
module.exports = (sequelize, {STRING, INTEGER}) => {
module.exports = (sequelize, { STRING, INTEGER }) => {
const Feedback = sequelize.define('Feedback', {
comment: {
type: STRING,
@@ -27,7 +27,7 @@ module.exports = (sequelize, {STRING, INTEGER}) => {
}
})
Feedback.associate = ({User}) => {
Feedback.associate = ({ User }) => {
Feedback.belongsTo(User) // no FK constraint to allow anonymous feedback posts
}
View
@@ -2,7 +2,7 @@
const utils = require('../lib/utils')
const challenges = require('../data/datacache').challenges
module.exports = (sequelize, {STRING, DECIMAL}) => {
module.exports = (sequelize, { STRING, DECIMAL }) => {
const Product = sequelize.define('Product', {
name: STRING,
description: {
@@ -18,7 +18,7 @@ module.exports = (sequelize, {STRING, DECIMAL}) => {
image: STRING
}, { paranoid: true })
Product.associate = ({Basket, BasketItem}) => {
Product.associate = ({ Basket, BasketItem }) => {
Product.belongsToMany(Basket, { through: BasketItem })
}
View
@@ -1,13 +1,13 @@
/* jslint node: true */
module.exports = (sequelize, {INTEGER, STRING, BOOLEAN, DATE}) => {
module.exports = (sequelize, { INTEGER, STRING, BOOLEAN, DATE }) => {
const Recycle = sequelize.define('Recycle', {
quantity: INTEGER,
address: STRING,
isPickup: { type: BOOLEAN, defaultValue: false },
date: DATE
})
Recycle.associate = ({User}) => {
Recycle.associate = ({ User }) => {
Recycle.belongsTo(User, { constraints: true, foreignKeyConstraint: true })
}
View
@@ -1,7 +1,7 @@
/* jslint node: true */
const insecurity = require('../lib/insecurity')
module.exports = (sequelize, {STRING, INTEGER}) => {
module.exports = (sequelize, { STRING, INTEGER }) => {
const SecurityAnswer = sequelize.define('SecurityAnswer', {
answer: {
type: STRING,
@@ -12,7 +12,7 @@ module.exports = (sequelize, {STRING, INTEGER}) => {
UserId: { type: INTEGER, unique: true }
})
SecurityAnswer.associate = ({User, SecurityQuestion}) => {
SecurityAnswer.associate = ({ User, SecurityQuestion }) => {
SecurityAnswer.belongsTo(User)
SecurityAnswer.belongsTo(SecurityQuestion, { constraints: true, foreignKeyConstraint: true })
}
@@ -1,5 +1,5 @@
/* jslint node: true */
module.exports = (sequelize, {STRING}) => {
module.exports = (sequelize, { STRING }) => {
const SecurityQuestion = sequelize.define('SecurityQuestion', {
question: STRING
}
View
@@ -3,7 +3,7 @@ const insecurity = require('../lib/insecurity')
const utils = require('../lib/utils')
const challenges = require('../data/datacache').challenges
module.exports = (sequelize, {STRING}) => {
module.exports = (sequelize, { STRING }) => {
const User = sequelize.define('User', {
email: {
type: STRING,
View
@@ -129,7 +129,7 @@
"sinon": "~6.0",
"sinon-chai": "~3.2",
"socket.io-client": "~2.1",
"standard": "~11",
"standard": "~12",
"stryker": "~0.29",
"stryker-api": "~0.21",
"stryker-html-reporter": "~0.16",
View
@@ -2,7 +2,7 @@ const path = require('path')
const utils = require('../lib/utils')
module.exports = function serveAngularClient () {
return ({url}, res, next) => {
return ({ url }, res, next) => {
if (!utils.startsWith(url, '/api') && !utils.startsWith(url, '/rest')) {
res.sendFile(path.resolve(__dirname, '../app/index.html'))
} else {
Oops, something went wrong.

0 comments on commit 811cb12

Please sign in to comment.