Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Minor OPA compatibility modifications.

  • Loading branch information...
commit d9e53e196d50f2338f87808e9b0a77dcb096f6b9 1 parent dcfed2d
@akoprow akoprow authored
Showing with 6 additions and 6 deletions.
  1. +5 −5 src/main.opa
  2. +1 −1  src/user.opa
View
10 src/main.opa
@@ -9,7 +9,7 @@ package mlstate.twopenny
* {1 Server definition, URL dispatching}
**/
-twopenny_page((title, content))(_conn_id) =
+twopenny_page((title, content))(_req) =
body =
<div id=#page>
{content}
@@ -18,14 +18,14 @@ twopenny_page((title, content))(_conn_id) =
resources = @static_include_directory("img")
-urls : Parser.general_parser(connexion_id -> resource) =
+urls : Parser.general_parser(http_request -> resource) =
parser
| {Rule.debug_parse_string(s -> jlog("URL: {s}"))} Rule.fail -> error("")
- | "/favicon." .* -> _conn_id ->
+ | "/favicon." .* -> _req ->
@static_resource("./img/favicon.png")
- | result={Server.resource_map(resources)} -> _conn_id ->
+ | result={Server.resource_map(resources)} -> _req ->
result
- | "/img/user-photo/" user=(.*) -> _conn_id ->
+ | "/img/user-photo/" user=(.*) -> _req ->
Text.to_string(user)
|> User.mk_ref(_)
|> User.get_user_photo_resource(_)
View
2  src/user.opa
@@ -43,7 +43,7 @@ User =
{ max_height_px = 80 max_width_px = 80 }
max_thumb_photo_size =
- { max_height_px = 40 max_width_px = 40 }
+ { max_height_px = 50 max_width_px = 50 }
get_user_photo_url(user_ref : User.ref) : string =
"/img/user-photo/{@unwrap(user_ref)}"
Please sign in to comment.
Something went wrong with that request. Please try again.