aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/oauth-client.js
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2016-12-29 10:33:36 +0100
committerChocobozzz <florian.bigard@gmail.com>2016-12-29 10:56:07 +0100
commit4712081f2a5f48749cf125d729e78b926ab28d6d (patch)
treeb0f2f380f6fe5403fb89fb5cfdbe9deafea1c889 /server/models/oauth-client.js
parent319d072e8eb7266cd8d33e0bb2fb5ebe76c487d1 (diff)
downloadPeerTube-4712081f2a5f48749cf125d729e78b926ab28d6d.tar.gz
PeerTube-4712081f2a5f48749cf125d729e78b926ab28d6d.tar.zst
PeerTube-4712081f2a5f48749cf125d729e78b926ab28d6d.zip
Server: add association between author and user
Diffstat (limited to 'server/models/oauth-client.js')
-rw-r--r--server/models/oauth-client.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/server/models/oauth-client.js b/server/models/oauth-client.js
index 758c4cf2f..021a34007 100644
--- a/server/models/oauth-client.js
+++ b/server/models/oauth-client.js
@@ -30,8 +30,8 @@ module.exports = function (sequelize, DataTypes) {
30 } 30 }
31 ], 31 ],
32 classMethods: { 32 classMethods: {
33 countTotal,
33 getByIdAndSecret, 34 getByIdAndSecret,
34 list,
35 loadFirstClient 35 loadFirstClient
36 } 36 }
37 } 37 }
@@ -42,8 +42,8 @@ module.exports = function (sequelize, DataTypes) {
42 42
43// --------------------------------------------------------------------------- 43// ---------------------------------------------------------------------------
44 44
45function list (callback) { 45function countTotal (callback) {
46 return this.findAll().asCallback(callback) 46 return this.count().asCallback(callback)
47} 47}
48 48
49function loadFirstClient (callback) { 49function loadFirstClient (callback) {