Skip to content

Commit abd6b7e

Browse files
committed
fix format
1 parent b123773 commit abd6b7e

File tree

5 files changed

+14
-10
lines changed

5 files changed

+14
-10
lines changed

nvd-server/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ edition = "2021"
77

88
[dependencies]
99
actix-web = { version = "4.4.0", features = ["openssl"] }
10+
actix-files = "0.6.2"
1011
actix-cors = "0.6.4"
1112
diesel = { version = "2.1.4", features = ["r2d2", "mysql", "chrono", "uuid", "serde_json"] }
1213
serde = { version = "1", features = ["derive"] }

nvd-server/nvd-er.mwb

-9 Bytes
Binary file not shown.

nvd-server/src/main.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ async fn main() -> std::io::Result<()> {
1818
.wrap(middleware::Logger::default())
1919
.app_data(web::Data::new(connection_pool.clone()))
2020
.service(web::scope("/api").configure(api_route))
21+
.service(
22+
actix_files::Files::new("/", "nvd-server/dist")
23+
.show_files_listing()
24+
.index_file("index.html"),
25+
)
2126
})
2227
.bind(("127.0.0.1", 8888))?
2328
.run()

nvd-yew/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ impl Component for App {
2121
fn view(&self, _ctx: &Context<Self>) -> Html {
2222
html! {
2323
<div class="page">
24-
<BrowserRouter>
24+
<HashRouter>
2525
<Nav />
2626
<Main />
27-
</BrowserRouter>
27+
</HashRouter>
2828
</div>
2929
}
3030
}

nvd-yew/src/routes/mod.rs

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
mod cve;
22
mod cve_list;
3-
mod cvss;
3+
// mod cvss;
44
mod home;
55
mod page_not_found;
66

77
use crate::modules::cve::CveInfoList;
88
use cve::CVEDetails;
9-
use cvss::Cvss;
9+
// use cvss::Cvss;
1010
use home::Home;
1111
use page_not_found::PageNotFound;
1212
use yew::prelude::*;
@@ -15,12 +15,10 @@ use yew_router::prelude::*;
1515
pub enum Route {
1616
#[at("/cve/:id")]
1717
Cve { id: String },
18-
#[at("/cve")]
18+
#[at("/cve/")]
1919
CveList,
2020
#[at("/")]
2121
Home,
22-
#[at("/cvss")]
23-
Cvss,
2422
#[not_found]
2523
#[at("/404")]
2624
NotFound,
@@ -38,9 +36,9 @@ impl Route {
3836
Route::Cve { id } => {
3937
html! {<CVEDetails id={id}/ >}
4038
}
41-
Route::Cvss => {
42-
html! { <Cvss /> }
43-
}
39+
// Route::Cvss => {
40+
// html! { <Cvss /> }
41+
// }
4442
Route::NotFound => {
4543
html! { <PageNotFound /> }
4644
}

0 commit comments

Comments
 (0)