Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create initial project structure (Frontend) #10

Merged
merged 35 commits into from
Nov 9, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
83bdd3e
add backend
archeoss Aug 18, 2023
beaac7b
post review fixes pt.1
archeoss Sep 7, 2023
2e8ebbb
post review fixes pt.2
archeoss Sep 10, 2023
818c26b
post review fixes (WIP)
archeoss Sep 17, 2023
357f0f9
change build flow + error handling
archeoss Sep 19, 2023
23e974f
clean up
archeoss Sep 19, 2023
76133a2
add frontend
archeoss Aug 19, 2023
e0685ef
update dev. paths for frontend + Update README
archeoss Aug 19, 2023
2f751be
migrate to astro
archeoss Aug 25, 2023
4901968
Update README
archeoss Aug 25, 2023
013fdd7
update deps
archeoss Aug 30, 2023
48fc07a
change frontend build dest.
archeoss Sep 3, 2023
34e4a90
update deps
archeoss Sep 5, 2023
eca2e14
update deps + scripts
archeoss Sep 7, 2023
1f7434a
post rebase tweaks
archeoss Sep 10, 2023
c97a42f
update readme
archeoss Sep 19, 2023
becb60d
bundle tweaks
archeoss Oct 3, 2023
76ae531
build process change + review fixes
archeoss Oct 5, 2023
8fbbb84
add windows compatibility
archeoss Oct 5, 2023
7a14556
remove redundant cfg
archeoss Oct 5, 2023
af5706b
change build process + post review fixes
archeoss Oct 6, 2023
5d20e48
log fixup
archeoss Oct 6, 2023
8470f09
fix test macro call
archeoss Oct 6, 2023
ab68a43
OpenAPI path validation + review fixes
archeoss Oct 9, 2023
df0663f
fix no-swagger build
archeoss Oct 9, 2023
5d08a3d
redo API validation + tests
archeoss Oct 12, 2023
d4b9d00
Post review fixes (+wrapper on router; -wrapper on method, etc.)
archeoss Oct 19, 2023
4206449
hotfix
archeoss Oct 19, 2023
7351399
hotfix 2
archeoss Oct 19, 2023
86a513b
add error accumulation for ContextRouter
archeoss Oct 20, 2023
9a8af15
small post-review fixes
archeoss Oct 23, 2023
bc0dab1
small post-review fixes
archeoss Oct 23, 2023
460e733
small fixes
archeoss Oct 30, 2023
03d783e
remove frontend dep.
archeoss Nov 4, 2023
4479b4e
bump deps
archeoss Nov 9, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion backend/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ repository.workspace = true
axum = "0.6"
axum-macros = "0.3"
axum-login = "0.6"
axum-sessions = "0.5"
axum-sessions = "0.6"
tower = "0.4"
tower-http = { version = "0.4", features = ["cors", "fs"] }

Expand Down
30 changes: 23 additions & 7 deletions backend/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ use backend::{
config::ConfigExt,
prelude::*,
root,
router::{NoApi, RouterApiExt},
services::api_router,
router::{ApiV1, ApiVersion, NoApi, RouterApiExt},
services::api_router_v1,
ApiDoc,
};
use cli::Parser;
Expand Down Expand Up @@ -67,11 +67,27 @@ fn router(cors: CorsLayer) -> Router {
// Add API
let router = router
.with_context::<NoApi, ApiDoc>()
.api_route("/root", Method::GET, root)
.expect("Couldn't register new API route")
.no_context();
// .no_context();
.api_route("/root", &Method::GET, root)
.unwrap()
.expect("Couldn't register new API route");

router
.nest("/api", api_router())
.nest(
ApiV1::to_path(),
api_router_v1().expect("couldn't get API routes"),
)
.layer(ServiceBuilder::new().layer(cors))
}

#[cfg(test)]
mod tests {
#![allow(clippy::unwrap_used)]
use backend::services::api_router_v1;

#[test]
fn register_routes() {
let router = api_router_v1();

assert!(router.is_ok(), "Err: {:?}", router.unwrap());
archeoss marked this conversation as resolved.
Show resolved Hide resolved
}
}
Loading