Skip to content
This repository has been archived by the owner on Aug 3, 2018. It is now read-only.

Commit

Permalink
chore: update packages (#157)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastian K authored and binarious committed Jul 15, 2017
1 parent 8009a90 commit cd6e50e
Show file tree
Hide file tree
Showing 15 changed files with 1,531 additions and 1,216 deletions.
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@
"mongoose": "^4.9.1",
"morgan": "^1.8.1",
"node-fetch": "^1.6.3",
"nodemailer": "^3.1.8",
"nodemailer": "^4.0.1",
"passport": "^0.3.2",
"passport-local": "^1.0.0",
"randomstring": "^1.1.5",
"socket.io": "^1.7.3",
"socket.io": "^2.0.3",
"socketio-jwt": "^4.5.0",
"timezones.json": "^1.2.0",
"web-push": "^3.2.2",
Expand All @@ -46,7 +46,7 @@
"babel-cli": "^6.24.0",
"babel-core": "^6.24.0",
"babel-eslint": "^7.2.1",
"babel-loader": "^6.4.1",
"babel-loader": "^7.1.1",
"babel-plugin-syntax-async-functions": "^6.13.0",
"babel-plugin-transform-regenerator": "^6.22.0",
"babel-plugin-transform-runtime": "^6.23.0",
Expand All @@ -57,24 +57,24 @@
"babel-preset-stage-2": "^6.22.0",
"babel-register": "^6.24.0",
"babel-runtime": "^6.23.0",
"chai": "^3.5.0",
"chai": "^4.1.0",
"cors": "^2.8.1",
"del": "^2.2.2",
"del": "^3.0.0",
"es6-promise": "^4.1.0",
"es6-promise-loader": "^1.0.2",
"es6-shim": "^0.35.3",
"es7-reflect-metadata": "^1.6.0",
"eslint": "^3.18.0",
"eslint": "^4.2.0",
"exports-loader": "^0.6.4",
"expose-loader": "^0.7.3",
"file-loader": "^0.10.1",
"file-loader": "^0.11.2",
"gulp": "^3.9.1",
"gulp-docco": "0.0.4",
"gulp-nodemon": "^2.2.1",
"gulp-rename": "^1.2.2",
"gulp-scss-lint": "^0.4.0",
"gulp-util": "^3.0.8",
"http-server": "^0.9.0",
"http-server": "^0.10.0",
"imports-loader": "^0.7.1",
"istanbul-instrumenter-loader": "^2.0.0",
"json-loader": "^0.5.4",
Expand All @@ -85,7 +85,7 @@
"karma-mocha-reporter": "^2.2.3",
"karma-phantomjs-launcher": "^1.0.4",
"karma-sourcemap-loader": "^0.3.7",
"karma-webpack": "2.0.3",
"karma-webpack": "^2.0.4",
"mocha": "^3.2.0",
"morgan": "^1.8.1",
"parse5": "^3.0.2",
Expand Down
2 changes: 1 addition & 1 deletion src/app/helper/profile.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ export class ProfileHelper {
// only one day ago = consecutive day
if (duration.asDays() === 1) {
meditations.currentConsecutiveDays =
meditations.currentConsecutiveDays == 0
meditations.currentConsecutiveDays == 0
? 2
: meditations.currentConsecutiveDays + 1;

Expand Down
4 changes: 2 additions & 2 deletions src/app/helper/profile.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ describe('ProfileHelper', () => {

profileHelper.calculateConsecutiveDays(meditations, moment('2016-09-02'));
expect(meditations.currentConsecutiveDays)
.to.equal(2, 'start with 2 consecutive days');
.to.equal(2, 'start with 2 consecutive days');

meditations.lastDay = moment('2016-09-02');

Expand All @@ -73,7 +73,7 @@ describe('ProfileHelper', () => {
meditations.lastDay = moment('2016-09-03');
profileHelper.calculateConsecutiveDays(meditations, moment('2016-09-05'));
expect(meditations.currentConsecutiveDays)
.to.equal(0, 'reset to 0 if duration is more than one day');
.to.equal(0, 'reset to 0 if duration is more than one day');
});

it('should add badge on 10 consecutive days', () => {
Expand Down
4 changes: 2 additions & 2 deletions src/app/helper/timezone.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ export default (user, time) => {
}

const detectedTz = timezones
.filter(tz => tz.value === user.timezone)
.reduce(tz => tz);
.filter(tz => tz.value === user.timezone)
.reduce(tz => tz);

if (!detectedTz) {
return moment(time).utc();
Expand Down
2 changes: 1 addition & 1 deletion src/app/models/user.model.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import mongoose from 'mongoose';
import bcrypt from 'bcrypt-nodejs';

let userSchema = mongoose.Schema({
username: { type: String, unique: true, validate: /^[a-zA-Z][a-zA-Z0-9-_\.]{3,20}$/},
username: { type: String, unique: true, validate: /^[a-zA-Z][a-zA-Z0-9-_.]{3,20}$/ },
local : {
password : String,
email : { type : String, unique : true }
Expand Down
4 changes: 2 additions & 2 deletions src/app/routes/_appointment.router.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export default (app, router, io, admin) => {
}
});

/**
/**
* @api {get} /api/appointment/:id Get single appointment
* @apiName GetAppointment
* @apiGroup Appointment
Expand All @@ -72,7 +72,7 @@ export default (app, router, io, admin) => {
}
});

/**
/**
* @api {put} /api/appointment/:id Update appointment
* @apiName UpdateAppointment
* @apiGroup Appointment
Expand Down
4 changes: 2 additions & 2 deletions src/app/routes/_broadcast.router.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export default (app, router, admin) => {
}
});

/**
/**
* @api {get} /api/broadcast/:id Get single broadcast
* @apiName GetBroadcast
* @apiGroup Broadcast
Expand All @@ -53,7 +53,7 @@ export default (app, router, admin) => {
}
});

/**
/**
* @api {put} /api/broadcast/:id Update broadcast
* @apiName UpdateBroadcast
* @apiGroup Broadcast
Expand Down
34 changes: 17 additions & 17 deletions src/app/routes/_commitment.router.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ export default (app, router, admin) => {
router.get('/api/commitment', async (req, res) => {
try {
const result = await Commitment
.find()
.populate('users', 'name gravatarHash username')
.lean()
.then();
.find()
.populate('users', 'name gravatarHash username')
.lean()
.then();

res.json(result);
} catch (err) {
Expand All @@ -38,11 +38,11 @@ export default (app, router, admin) => {
router.get('/api/commitment/user', async (req, res) => {
try {
const result = await Commitment
.findOne({
users: new ObjectId(req.user._doc._id)
})
.lean()
.then();
.findOne({
users: new ObjectId(req.user._doc._id)
})
.lean()
.then();

res.json(result);
} catch (err) {
Expand All @@ -61,9 +61,9 @@ export default (app, router, admin) => {
router.get('/api/commitment/:id', admin, async (req, res) => {
try {
const result = await Commitment
.findOne({ _id: req.params.id })
.lean()
.then();
.findOne({ _id: req.params.id })
.lean()
.then();

if (!result) return res.sendStatus(404);
res.json(result);
Expand Down Expand Up @@ -106,8 +106,8 @@ export default (app, router, admin) => {
res.sendStatus(201);
} catch (err) {
res
.status(err.name === 'ValidationError' ? 400 : 500)
.send(err);
.status(err.name === 'ValidationError' ? 400 : 500)
.send(err);
}
});

Expand Down Expand Up @@ -179,9 +179,9 @@ export default (app, router, admin) => {
router.delete('/api/commitment/:id', admin, async (req, res) => {
try {
const result = await Commitment
.find({ _id: req.params.id })
.remove()
.exec();
.find({ _id: req.params.id })
.remove()
.exec();

res.json(result);
} catch (err) {
Expand Down
Loading

0 comments on commit cd6e50e

Please sign in to comment.