Updated the ytmusic cookies situation
This commit is contained in:
@@ -242,3 +242,25 @@ pub async fn save_config(config: &AppConfig) -> Result<AppConfig, ApiError> {
|
||||
}
|
||||
resp.json().await.map_err(|e| ApiError(e.to_string()))
|
||||
}
|
||||
|
||||
// --- YouTube Auth ---
|
||||
|
||||
pub async fn get_ytauth_status() -> Result<YtAuthStatus, ApiError> {
|
||||
get_json(&format!("{BASE}/ytauth/status")).await
|
||||
}
|
||||
|
||||
pub async fn ytauth_login_start() -> Result<serde_json::Value, ApiError> {
|
||||
post_empty(&format!("{BASE}/ytauth/login-start")).await
|
||||
}
|
||||
|
||||
pub async fn ytauth_login_stop() -> Result<serde_json::Value, ApiError> {
|
||||
post_empty(&format!("{BASE}/ytauth/login-stop")).await
|
||||
}
|
||||
|
||||
pub async fn ytauth_refresh() -> Result<serde_json::Value, ApiError> {
|
||||
post_empty(&format!("{BASE}/ytauth/refresh")).await
|
||||
}
|
||||
|
||||
pub async fn ytauth_clear_cookies() -> Result<(), ApiError> {
|
||||
delete(&format!("{BASE}/ytauth/cookies")).await
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user