-async function getAdminTokenOrDie (server: ServerInfo, username: string, password: string) {
- const accessToken = await server.loginCommand.getAccessToken(username, password)
- const resMe = await getMyUserInformation(server.url, accessToken)
- const me: User = resMe.body
+async function getAdminTokenOrDie (server: PeerTubeServer, username: string, password: string) {
+ const token = await server.login.getAccessToken(username, password)
+ const me = await server.users.getMyInfo({ token })