Skip to content

Commit

Permalink
fix format
Browse files Browse the repository at this point in the history
  • Loading branch information
cn-kali-team committed Dec 4, 2023
1 parent b123773 commit abd6b7e
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 10 deletions.
1 change: 1 addition & 0 deletions nvd-server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ edition = "2021"

[dependencies]
actix-web = { version = "4.4.0", features = ["openssl"] }
actix-files = "0.6.2"
actix-cors = "0.6.4"
diesel = { version = "2.1.4", features = ["r2d2", "mysql", "chrono", "uuid", "serde_json"] }
serde = { version = "1", features = ["derive"] }
Expand Down
Binary file modified nvd-server/nvd-er.mwb
Binary file not shown.
5 changes: 5 additions & 0 deletions nvd-server/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ async fn main() -> std::io::Result<()> {
.wrap(middleware::Logger::default())
.app_data(web::Data::new(connection_pool.clone()))
.service(web::scope("/api").configure(api_route))
.service(
actix_files::Files::new("/", "nvd-server/dist")
.show_files_listing()
.index_file("index.html"),
)
})
.bind(("127.0.0.1", 8888))?
.run()
Expand Down
4 changes: 2 additions & 2 deletions nvd-yew/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ impl Component for App {
fn view(&self, _ctx: &Context<Self>) -> Html {
html! {
<div class="page">
<BrowserRouter>
<HashRouter>
<Nav />
<Main />
</BrowserRouter>
</HashRouter>
</div>
}
}
Expand Down
14 changes: 6 additions & 8 deletions nvd-yew/src/routes/mod.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
mod cve;
mod cve_list;
mod cvss;
// mod cvss;
mod home;
mod page_not_found;

use crate::modules::cve::CveInfoList;
use cve::CVEDetails;
use cvss::Cvss;
// use cvss::Cvss;
use home::Home;
use page_not_found::PageNotFound;
use yew::prelude::*;
Expand All @@ -15,12 +15,10 @@ use yew_router::prelude::*;
pub enum Route {
#[at("/cve/:id")]
Cve { id: String },
#[at("/cve")]
#[at("/cve/")]
CveList,
#[at("/")]
Home,
#[at("/cvss")]
Cvss,
#[not_found]
#[at("/404")]
NotFound,
Expand All @@ -38,9 +36,9 @@ impl Route {
Route::Cve { id } => {
html! {<CVEDetails id={id}/ >}
}
Route::Cvss => {
html! { <Cvss /> }
}
// Route::Cvss => {
// html! { <Cvss /> }
// }
Route::NotFound => {
html! { <PageNotFound /> }
}
Expand Down

0 comments on commit abd6b7e

Please sign in to comment.