]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/models/user.js
Server: delete user with the id and not the username
[github/Chocobozzz/PeerTube.git] / server / models / user.js
index 0bbd638d497bce4ad060732b5d4c5a55493af71c..351ffef86244900e2484a1ec5b7ea3f459bc942c 100644 (file)
@@ -21,6 +21,7 @@ UserSchema.methods = {
 UserSchema.statics = {
   getByUsernameAndPassword: getByUsernameAndPassword,
   list: list,
+  loadById: loadById,
   loadByUsername: loadByUsername
 }
 
@@ -36,6 +37,10 @@ function list (callback) {
   return this.find(callback)
 }
 
+function loadById (id, callback) {
+  return this.findById(id, callback)
+}
+
 function loadByUsername (username, callback) {
   return this.findOne({ username: username }, callback)
 }