]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - shared/extra-utils/users/login.ts
Fix CLI tools
[github/Chocobozzz/PeerTube.git] / shared / extra-utils / users / login.ts
index 39e1a2747d0e93ccd39ab549e9b58885b8928bbc..c14367542ca79a74e20157a75fe80e433e9f4bc2 100644 (file)
@@ -4,9 +4,9 @@ import { ServerInfo } from '../server/servers'
 import { getClient } from '../server/clients'
 import { HttpStatusCode } from '../../../shared/core-utils/miscs/http-error-codes'
 
-type Client = { id: string, secret: string }
+type Client = { id?: string, secret?: string }
 type User = { username: string, password: string }
-type Server = { url: string, client: Client, user: User }
+type Server = { url?: string, client?: Client, user?: User }
 
 function login (url: string, client: Client, user: User, expectedStatus = HttpStatusCode.OK_200) {
   const path = '/api/v1/users/token'