mirror of
https://github.com/ninenines/cowboy.git
synced 2025-07-14 12:20:24 +00:00
Fix rest_pastebin example
This commit is contained in:
parent
5e5d8ab299
commit
ddbe4e53b8
1 changed files with 1 additions and 1 deletions
|
@ -51,7 +51,7 @@ create_paste(Req, State) ->
|
||||||
ok = file:write_file(full_path(PasteID), Paste),
|
ok = file:write_file(full_path(PasteID), Paste),
|
||||||
case cowboy_req:method(Req3) of
|
case cowboy_req:method(Req3) of
|
||||||
{<<"POST">>, Req4} ->
|
{<<"POST">>, Req4} ->
|
||||||
{<<$/, PasteID/binary>>, Req4, State};
|
{{true, <<$/, PasteID/binary>>}, Req4, State};
|
||||||
{_, Req4} ->
|
{_, Req4} ->
|
||||||
{true, Req4, State}
|
{true, Req4, State}
|
||||||
end.
|
end.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue