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

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::HalEntity;
use serde::Deserialize;
@@ -22,11 +22,11 @@ pub struct Root {
}
pub trait RootClient {
async fn root(&self) -> Result<Root, Error>;
async fn root(&self) -> Result<Root, OpenProjectError>;
}
impl RootClient for Client {
async fn root(&self) -> Result<Root, Error> {
async fn root(&self) -> Result<Root, OpenProjectError> {
let client = reqwest::Client::new();
let response = client