Skip to content

Commit 0b75663

Browse files
aw-server: Remove unused catchers
1 parent 00c001b commit 0b75663

File tree

1 file changed

+0
-19
lines changed

1 file changed

+0
-19
lines changed

aw-server/src/endpoints/mod.rs

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -99,24 +99,6 @@ fn server_info(config: State<AWConfig>) -> JsonValue {
9999
})
100100
}
101101

102-
// This catcher is sadly invalid as catchers in rocket are only forwarded if they
103-
// have code 400-599 for some reason
104-
#[catch(304)]
105-
fn not_modified() -> JsonValue {
106-
json!({
107-
"status": 304,
108-
"reason": "Not modified."
109-
})
110-
}
111-
112-
#[catch(404)]
113-
fn not_found() -> JsonValue {
114-
json!({
115-
"status": 404,
116-
"reason": "Resource was not found."
117-
})
118-
}
119-
120102
pub fn build_rocket(server_state: ServerState, config: AWConfig) -> rocket::Rocket {
121103
info!(
122104
"Starting aw-server-rust at {}:{}",
@@ -166,7 +148,6 @@ pub fn build_rocket(server_state: ServerState, config: AWConfig) -> rocket::Rock
166148
],
167149
)
168150
.attach(cors::cors(&config))
169-
.register(catchers![not_modified, not_found])
170151
.manage(server_state)
171152
.manage(config)
172153
}

0 commit comments

Comments
 (0)