aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/extra-utils/users
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-07-09 15:03:44 +0200
committerChocobozzz <me@florianbigard.com>2021-07-20 15:27:18 +0200
commit078f17e6d90376050f43ce639e88e11869b49ee7 (patch)
tree1aeef2c43591de2f72b84b85672de8e83815e8fa /shared/extra-utils/users
parent12edc1495a36b2199f1bf1ba37f50c7b694be382 (diff)
downloadPeerTube-078f17e6d90376050f43ce639e88e11869b49ee7.tar.gz
PeerTube-078f17e6d90376050f43ce639e88e11869b49ee7.tar.zst
PeerTube-078f17e6d90376050f43ce639e88e11869b49ee7.zip
Fix CLI tools
Diffstat (limited to 'shared/extra-utils/users')
-rw-r--r--shared/extra-utils/users/login.ts4
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'
4import { getClient } from '../server/clients' 4import { getClient } from '../server/clients'
5import { HttpStatusCode } from '../../../shared/core-utils/miscs/http-error-codes' 5import { HttpStatusCode } from '../../../shared/core-utils/miscs/http-error-codes'
6 6
7type Client = { id: string, secret: string } 7type Client = { id?: string, secret?: string }
8type User = { username: string, password: string } 8type User = { username: string, password: string }
9type Server = { url: string, client: Client, user: User } 9type Server = { url?: string, client?: Client, user?: User }
10 10
11function login (url: string, client: Client, user: User, expectedStatus = HttpStatusCode.OK_200) { 11function 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'