mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-04 02:09:37 +02:00
Add ability to list and revoke token sessions
This commit is contained in:
parent
a53ed039b8
commit
57caf25611
40 changed files with 1158 additions and 138 deletions
|
@ -232,13 +232,22 @@ export class UsersCommand extends AbstractCommand {
|
|||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
getMyInfo (options: OverrideCommandOptions = {}) {
|
||||
getMyInfo (options: OverrideCommandOptions & {
|
||||
userAgent?: string
|
||||
xForwardedFor?: string
|
||||
} = {}) {
|
||||
const path = '/api/v1/users/me'
|
||||
|
||||
const headers = options.userAgent
|
||||
? { 'user-agent': options.userAgent }
|
||||
: {}
|
||||
|
||||
return this.getRequestBody<MyUser>({
|
||||
...options,
|
||||
|
||||
path,
|
||||
headers,
|
||||
xForwardedFor: options.xForwardedFor,
|
||||
implicitToken: true,
|
||||
defaultExpectedStatus: HttpStatusCode.OK_200
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue