Skip to content

Commit 395c09b

Browse files
authored
Rename schemas to model (#12)
1 parent 3e5c616 commit 395c09b

File tree

7 files changed

+8
-8
lines changed

7 files changed

+8
-8
lines changed

src/clients.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use std::fmt;
22

3-
use crate::schemas::tiled_metadata::Metadata;
3+
use crate::model::metadata::Metadata;
44

55
#[cfg(test)]
66
pub(crate) mod mock_tiled_client;

src/clients/mock_tiled_client.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use std::path::PathBuf;
44
use serde::de::DeserializeOwned;
55

66
use crate::clients::{Client, ClientResult};
7-
use crate::schemas::tiled_metadata::Metadata;
7+
use crate::model::metadata::Metadata;
88
pub struct MockTiledClient {
99
pub dir_path: PathBuf,
1010
}

src/clients/tiled_client.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use reqwest::Url;
22
use serde::de::DeserializeOwned;
33

44
use crate::clients::{Client, ClientResult};
5-
use crate::schemas::tiled_metadata::Metadata;
5+
use crate::model::metadata::Metadata;
66

77
pub struct TiledClient {
88
pub address: Url,

src/handlers/graphql.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use axum::Extension;
55
use axum::response::{Html, IntoResponse};
66

77
use crate::clients::Client;
8-
use crate::schemas::TiledQuery;
8+
use crate::model::TiledQuery;
99

1010
pub async fn graphql_handler<T: Client + Send + Sync + 'static>(
1111
schema: Extension<Schema<TiledQuery<T>, EmptyMutation, EmptySubscription>>,

src/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ mod cli;
88
mod clients;
99
mod config;
1010
mod handlers;
11-
mod schemas;
11+
mod model;
1212

1313
use cli::{Cli, Commands};
1414

1515
use crate::clients::tiled_client::TiledClient;
1616
use crate::config::GlazedConfig;
1717
use crate::handlers::graphql::{graphiql_handler, graphql_handler};
18-
use crate::schemas::TiledQuery;
18+
use crate::model::TiledQuery;
1919

2020
#[tokio::main]
2121
async fn main() -> Result<(), Box<dyn error::Error>> {
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
pub(crate) mod tiled_metadata;
1+
pub(crate) mod metadata;
22

33
use async_graphql::Object;
44

@@ -8,7 +8,7 @@ pub(crate) struct TiledQuery<T>(pub T);
88

99
#[Object]
1010
impl<T: Client + Send + Sync + 'static> TiledQuery<T> {
11-
async fn metadata(&self) -> async_graphql::Result<tiled_metadata::Metadata, ClientError> {
11+
async fn metadata(&self) -> async_graphql::Result<metadata::Metadata, ClientError> {
1212
self.0.metadata().await
1313
}
1414
}

0 commit comments

Comments
 (0)