mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
login username password.
This commit is contained in:
parent
85c4f4371d
commit
4230eb3e07
@ -197,12 +197,12 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public async login(id: string, secret: string) {
|
public async login(username: string, password: string) {
|
||||||
if (this.authenticated) {
|
if (this.authenticated) {
|
||||||
throw new Error('client already authenticated')
|
throw new Error('client already authenticated')
|
||||||
}
|
}
|
||||||
|
|
||||||
await this.api.session.login({ id, secret })
|
await this.api.session.login({ username, password })
|
||||||
Vue.set(this.state.connection, 'authenticated', true)
|
Vue.set(this.state.connection, 'authenticated', true)
|
||||||
this.websocket.connect()
|
this.websocket.connect()
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user