From 75949cebdd61dd8f0d06f2e47081c460e2a442f0 Mon Sep 17 00:00:00 2001 From: metamuffin Date: Fri, 22 Dec 2023 23:57:03 +0100 Subject: rework import system pt. 8: federated streams & change jhls --- client/src/lib.rs | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'client/src') diff --git a/client/src/lib.rs b/client/src/lib.rs index 96349ed..f88ecc5 100644 --- a/client/src/lib.rs +++ b/client/src/lib.rs @@ -4,14 +4,12 @@ Copyright (C) 2023 metamuffin */ use anyhow::Result; -use jellycommon::user::UserPermission; +use jellycommon::user::CreateSessionParams; use log::{debug, info}; use reqwest::{ header::{HeaderMap, HeaderValue}, Client, }; -use serde::Serialize; -use std::collections::HashSet; use stream::StreamSpec; use tokio::io::AsyncWriteExt; @@ -23,14 +21,6 @@ pub struct Instance { pub tls: bool, } -#[derive(Serialize)] -pub struct LoginDetails { - pub username: String, - pub password: String, - pub expire: Option, - pub drop_permissions: Option>, -} - impl Instance { pub fn new(host: String, tls: bool) -> Self { Self { host, tls } @@ -42,7 +32,7 @@ impl Instance { self.host ) } - pub async fn login(self, data: LoginDetails) -> anyhow::Result { + pub async fn login(self, data: CreateSessionParams) -> anyhow::Result { let session_token = Client::builder() .build()? .post(format!("{}/api/create_session", self.base())) -- cgit v1.2.3-70-g09d2