Skip to content

Commit

Permalink
修复上一版本bug
Browse files Browse the repository at this point in the history
  • Loading branch information
adamswsk committed Oct 26, 2021
1 parent 949bc7a commit ef9c188
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion farmbot_ext/lib/farmbot_ext/bootstrap/authorization.ex
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ defmodule FarmbotExt.Bootstrap.Authorization do
@headers [
{"User-Agent", "FarmbotOS/#{@version} (#{@target}) #{@target} ()"},
{"Content-Type", "application/json"},
{"AppID","UCARD"}
{"AppID", "UCARD"}
]

@spec fetch_rsa_key(server) :: {:ok, term} | {:error, String.t() | atom}
Expand Down
4 changes: 2 additions & 2 deletions farmbot_os/priv/static/templates/credentials.html.eex
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
onclick="showPassword()" title="Show password">
</div>

<!--<label for="server"> Server </label>
<input value="<%= server %>" type="url" name=server required></p>-->
<label for="server" style="display:none"> Server </label>
<input value="<%= server %>" type="url" name=server required>
</fieldset>
<div>
<b>WARNING:</b>
Expand Down
4 changes: 2 additions & 2 deletions farmbot_os/test/farmbot_os/configurator/router_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -308,12 +308,12 @@ defmodule FarmbotOS.Configurator.RouterTest do
FarmbotOS.Configurator.ConfigDataLayer
|> expect(:load_email, fn -> "[email protected]" end)
|> expect(:load_password, fn -> "password123" end)
|> expect(:load_server, fn -> "https://my.farm.bot" end)
|> expect(:load_server, fn -> "http://111.229.7.173:3000" end)

conn = conn(:get, "/credentials") |> Router.call(@opts)
assert conn.resp_body =~ "[email protected]"
assert conn.resp_body =~ "password123"
assert conn.resp_body =~ "https://my.farm.bot"
assert conn.resp_body =~ "http://111.229.7.173:3000"
end

@tag :capture_log
Expand Down

0 comments on commit ef9c188

Please sign in to comment.