aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/pods.js
diff options
context:
space:
mode:
Diffstat (limited to 'server/models/pods.js')
-rw-r--r--server/models/pods.js14
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
3var mongoose = require('mongoose') 3const mongoose = require('mongoose')
4 4
5var constants = require('../initializers/constants') 5const constants = require('../initializers/constants')
6var logger = require('../helpers/logger') 6const logger = require('../helpers/logger')
7 7
8// --------------------------------------------------------------------------- 8// ---------------------------------------------------------------------------
9 9
10var podsSchema = mongoose.Schema({ 10const 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})
15var PodsDB = mongoose.model('pods', podsSchema) 15const PodsDB = mongoose.model('pods', podsSchema)
16 16
17// --------------------------------------------------------------------------- 17// ---------------------------------------------------------------------------
18 18
19var Pods = { 19const 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
32function add (data, callback) { 32function 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