diff options
Diffstat (limited to 'server/models/pods.js')
-rw-r--r-- | server/models/pods.js | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/server/models/pods.js b/server/models/pods.js index 57ed20292..4e21001f5 100644 --- a/server/models/pods.js +++ b/server/models/pods.js | |||
@@ -1,22 +1,22 @@ | |||
1 | 'use strict' | 1 | 'use strict' |
2 | 2 | ||
3 | var mongoose = require('mongoose') | 3 | const mongoose = require('mongoose') |
4 | 4 | ||
5 | var constants = require('../initializers/constants') | 5 | const constants = require('../initializers/constants') |
6 | var logger = require('../helpers/logger') | 6 | const logger = require('../helpers/logger') |
7 | 7 | ||
8 | // --------------------------------------------------------------------------- | 8 | // --------------------------------------------------------------------------- |
9 | 9 | ||
10 | var podsSchema = mongoose.Schema({ | 10 | const podsSchema = mongoose.Schema({ |
11 | url: String, | 11 | url: String, |
12 | publicKey: String, | 12 | publicKey: String, |
13 | score: { type: Number, max: constants.FRIEND_BASE_SCORE } | 13 | score: { type: Number, max: constants.FRIEND_BASE_SCORE } |
14 | }) | 14 | }) |
15 | var PodsDB = mongoose.model('pods', podsSchema) | 15 | const PodsDB = mongoose.model('pods', podsSchema) |
16 | 16 | ||
17 | // --------------------------------------------------------------------------- | 17 | // --------------------------------------------------------------------------- |
18 | 18 | ||
19 | var Pods = { | 19 | const Pods = { |
20 | add: add, | 20 | add: add, |
21 | count: count, | 21 | count: count, |
22 | findByUrl: findByUrl, | 22 | findByUrl: findByUrl, |
@@ -31,7 +31,7 @@ var Pods = { | |||
31 | // TODO: check if the pod is not already a friend | 31 | // TODO: check if the pod is not already a friend |
32 | function add (data, callback) { | 32 | function add (data, callback) { |
33 | if (!callback) callback = function () {} | 33 | if (!callback) callback = function () {} |
34 | var params = { | 34 | const params = { |
35 | url: data.url, | 35 | url: data.url, |
36 | publicKey: data.publicKey, | 36 | publicKey: data.publicKey, |
37 | score: constants.FRIEND_BASE_SCORE | 37 | score: constants.FRIEND_BASE_SCORE |