feat: update
All checks were successful
continuous-integration/drone/push Build is passing

Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
Kasper Juul Hermansen 2024-04-10 20:50:48 +02:00
parent ec8d0b5ebc
commit 74ea9ddf79
Signed by: kjuulh
GPG Key ID: 57B6E1465221F912
35 changed files with 5 additions and 11 deletions

View File

@ -1,3 +1,2 @@
[workspace]
members = ["src/cmd/scel", "src/lib/scel_core", "src/lib/scel_api"]
members = ["crates/*"]

View File

@ -12,5 +12,5 @@ tracing-subscriber = { version = "0.3", features = ["env-filter"] }
anyhow = { version = "1.0.66" }
dotenv = { version = "*" }
scel_api = { path = "../../lib/scel_api" }
scel_core = { path = "../../lib/scel_core" }
scel_api = { path = "../scel_api" }
scel_core = { path = "../scel_core" }

View File

@ -22,7 +22,7 @@ use axum::{
use graphql::{
mutation::MutationRoot, query::QueryRoot, schema::ScelSchema, subscription::SubscriptionRoot,
};
use hyper::{client::HttpConnector, Body, StatusCode, Uri};
use reqwest::StatusCode;
use scel_core::App;
use serde::{Deserialize, Serialize};
use tower_http::{
@ -49,8 +49,6 @@ pub struct Server {
addr: SocketAddr,
}
type Client = hyper::client::Client<HttpConnector, Body>;
impl Server {
pub fn new(app: Arc<App>) -> Server {
let schema = Schema::build(QueryRoot, MutationRoot, SubscriptionRoot)
@ -83,7 +81,6 @@ impl Server {
.fallback(get_service(ServeDir::new("./src/web/dist/")).handle_error(handle_error))
.layer(Extension(schema))
.layer(Extension(MemoryStore::new()))
.layer(Extension(Client::new()))
.layer(Extension(auth::oauth_client()))
.layer(
CorsLayer::new()
@ -93,9 +90,7 @@ impl Server {
)
.layer(TraceLayer::new_for_http().make_span_with(DefaultMakeSpan::default()));
let app = Router::new()
.nest("/api", api_router)
.fallback(svc)
let app = Router::new().nest("/api", api_router);
let addr = SocketAddr::from(([0, 0, 0, 0], 3000));

View File

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

Before

Width:  |  Height:  |  Size: 4.0 KiB

After

Width:  |  Height:  |  Size: 4.0 KiB