allow multiple instances of gitlab to be configured

This commit is contained in:
2024-03-17 21:34:03 +01:00
parent 34f6eac006
commit df71e1073c
8 changed files with 80 additions and 39 deletions
+3 -3
View File
@@ -1,4 +1,4 @@
use crate::openproject::client::{handle_response_status, Client, Error};
use crate::openproject::client::{handle_response_status, Client, OpenProjectError};
use crate::openproject::hal::Link;
use crate::openproject::root::RootClient;
use serde::Deserialize;
@@ -19,11 +19,11 @@ pub struct User {
}
pub trait GetMe {
async fn me(&self) -> Result<User, Error>;
async fn me(&self) -> Result<User, OpenProjectError>;
}
impl GetMe for Client {
async fn me(&self) -> Result<User, Error> {
async fn me(&self) -> Result<User, OpenProjectError> {
let r = self.root().await?;
let client = reqwest::Client::new();