Fixed unused param + simplification
This commit is contained in:
parent
ffc062727a
commit
f3d8eea546
2 changed files with 3 additions and 5 deletions
|
@ -673,13 +673,11 @@ let error_template error _debug_info suggested_response =
|
||||||
| None -> "?"
|
| None -> "?"
|
||||||
| Some req -> Dream.target req in
|
| Some req -> Dream.target req in
|
||||||
let referer =
|
let referer =
|
||||||
error.Dream.request
|
Option.bind error.Dream.request (fun req -> Dream.header req "referer")
|
||||||
|> Option.map (fun req -> Dream.header req "referer")
|
|
||||||
|> Option.value ~default:None
|
|
||||||
in
|
in
|
||||||
let html =
|
let html =
|
||||||
if is_iframe_page ~req:error.Dream.request then
|
if is_iframe_page ~req:error.Dream.request then
|
||||||
Views.viz_not_found ~target
|
Views.viz_not_found
|
||||||
else
|
else
|
||||||
Views.page_not_found ~target ~referer
|
Views.page_not_found ~target ~referer
|
||||||
in
|
in
|
||||||
|
|
|
@ -235,7 +235,7 @@ let page_not_found ~target ~referer =
|
||||||
)
|
)
|
||||||
|> layout ~title:"Page not found"
|
|> layout ~title:"Page not found"
|
||||||
|
|
||||||
let viz_not_found ~target =
|
let viz_not_found =
|
||||||
let title = "Visualization not found" in
|
let title = "Visualization not found" in
|
||||||
let content =
|
let content =
|
||||||
[
|
[
|
||||||
|
|
Loading…
Reference in a new issue