diff options
author | Chocobozzz <me@florianbigard.com> | 2021-07-09 15:03:44 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-07-20 15:27:18 +0200 |
commit | 078f17e6d90376050f43ce639e88e11869b49ee7 (patch) | |
tree | 1aeef2c43591de2f72b84b85672de8e83815e8fa /shared/extra-utils/users/login.ts | |
parent | 12edc1495a36b2199f1bf1ba37f50c7b694be382 (diff) | |
download | PeerTube-078f17e6d90376050f43ce639e88e11869b49ee7.tar.gz PeerTube-078f17e6d90376050f43ce639e88e11869b49ee7.tar.zst PeerTube-078f17e6d90376050f43ce639e88e11869b49ee7.zip |
Fix CLI tools
Diffstat (limited to 'shared/extra-utils/users/login.ts')
-rw-r--r-- | shared/extra-utils/users/login.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/shared/extra-utils/users/login.ts b/shared/extra-utils/users/login.ts index 39e1a2747..c14367542 100644 --- a/shared/extra-utils/users/login.ts +++ b/shared/extra-utils/users/login.ts | |||
@@ -4,9 +4,9 @@ import { ServerInfo } from '../server/servers' | |||
4 | import { getClient } from '../server/clients' | 4 | import { getClient } from '../server/clients' |
5 | import { HttpStatusCode } from '../../../shared/core-utils/miscs/http-error-codes' | 5 | import { HttpStatusCode } from '../../../shared/core-utils/miscs/http-error-codes' |
6 | 6 | ||
7 | type Client = { id: string, secret: string } | 7 | type Client = { id?: string, secret?: string } |
8 | type User = { username: string, password: string } | 8 | type User = { username: string, password: string } |
9 | type Server = { url: string, client: Client, user: User } | 9 | type Server = { url?: string, client?: Client, user?: User } |
10 | 10 | ||
11 | function login (url: string, client: Client, user: User, expectedStatus = HttpStatusCode.OK_200) { | 11 | function login (url: string, client: Client, user: User, expectedStatus = HttpStatusCode.OK_200) { |
12 | const path = '/api/v1/users/token' | 12 | const path = '/api/v1/users/token' |