Remove incorrect (and unused) code.
This commit is contained in:
parent
3311ded843
commit
4fc63010d4
@ -2,13 +2,9 @@ import {Unauthorized} from '../api-errors'
|
||||
|
||||
// ===================================================================
|
||||
|
||||
// TODO: Prevent token connections from creating tokens.
|
||||
// TODO: Token permission.
|
||||
export async function create () {
|
||||
// The user MUST not be signed with a token
|
||||
if (this.session.has('token_id')) {
|
||||
throw new Unauthorized()
|
||||
}
|
||||
|
||||
const userId = this.session.get('user_id')
|
||||
return (await this.createAuthenticationToken({userId})).id
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user