From 0c1cbbfe29d91c95f9c574b57adf067654b8b5b4 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 14 Apr 2016 22:06:11 +0200 Subject: Add authentications for routes that need it and adapts the tests --- server/models/users.js | 2 +- server/models/videos.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'server/models') diff --git a/server/models/users.js b/server/models/users.js index 367c206ab..046fe462d 100644 --- a/server/models/users.js +++ b/server/models/users.js @@ -104,7 +104,7 @@ function saveToken (token, client, user) { } return OAuthTokensDB.create(token_to_create, function (err, token_created) { - if (err) throw err // node-oauth2-server library use Promise.try + if (err) throw err // node-oauth2-server library uses Promise.try token_created.client = client token_created.user = user diff --git a/server/models/videos.js b/server/models/videos.js index 0141cbb7f..13ef2295a 100644 --- a/server/models/videos.js +++ b/server/models/videos.js @@ -21,7 +21,8 @@ const videosSchema = mongoose.Schema({ namePath: String, description: String, magnetUri: String, - podUrl: String + podUrl: String, + author: String }) const VideosDB = mongoose.model('videos', videosSchema) -- cgit v1.2.3