mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-05 10:49:28 +02:00
Server: implement refresh token
This commit is contained in:
parent
66698b833f
commit
2f372a8654
9 changed files with 78 additions and 23 deletions
|
@ -11,8 +11,8 @@ UserSchema.path('password').required(true)
|
|||
UserSchema.path('username').required(true)
|
||||
|
||||
UserSchema.statics = {
|
||||
list: list,
|
||||
loadByUsernameAndPassword: loadByUsernameAndPassword
|
||||
getByUsernameAndPassword: getByUsernameAndPassword,
|
||||
list: list
|
||||
}
|
||||
|
||||
mongoose.model('User', UserSchema)
|
||||
|
@ -23,6 +23,6 @@ function list (callback) {
|
|||
return this.find(callback)
|
||||
}
|
||||
|
||||
function loadByUsernameAndPassword (username, password, callback) {
|
||||
return this.findOne({ username: username, password: password }, callback)
|
||||
function getByUsernameAndPassword (username, password) {
|
||||
return this.findOne({ username: username, password: password })
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue