check if the user is in a nextsync repo and fail else

This commit is contained in:
grimhilt
2023-06-25 18:26:59 +02:00
parent d3592a5209
commit b74c5c176b
15 changed files with 49 additions and 155 deletions

View File

@@ -2,7 +2,7 @@ use std::env;
use dotenv::dotenv;
use reqwest::Client;
use reqwest::RequestBuilder;
use reqwest::{Response, Error, IntoUrl, Method};
use reqwest::{Response, Error, Method};
use crate::utils::api::ApiProps;
#[derive(Debug)]
@@ -26,11 +26,6 @@ impl ApiBuilder {
}
}
pub fn set_request<U: IntoUrl>(&mut self, method: Method, url: U) -> &mut ApiBuilder {
self.request = Some(self.client.request(method, url));
self
}
pub fn build_request(&mut self, method: Method, path: &str) -> &mut ApiBuilder {
dotenv().ok();
// todo remove env

View File

@@ -1,4 +1,4 @@
use reqwest::{Method, IntoUrl, Response, Error};
use reqwest::{Method, Response, Error};
use crate::services::api::{ApiBuilder, ApiError};
pub struct CreateFolder {