Skip to content

Commit

Permalink
name changes to parameters
Browse files Browse the repository at this point in the history
Delete some iles and test if image is rebuild
  • Loading branch information
SidneyNiccolson committed Jun 26, 2018
1 parent 37a5567 commit 22f806c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -201,15 +201,15 @@ fn ssid(req: &mut Request) -> IronResult<Response> {
}

fn connect(req: &mut Request) -> IronResult<Response> {
let (ssid, passphrase, API, WS, serial, secret) = {
let (ssid, passphrase, api, ws, serial, secret) = {
let params = get_request_ref!(req, Params, "Getting request params failed");
let ssid = get_param!(params, "ssid", String);
let passphrase = get_param!(params, "passphrase", String);
let API = get_param!(params, "API", String);
let WS = get_param!(params, "WS", String);
let api = get_param!(params, "API", String);
let ws = get_param!(params, "WS", String);
let serial = get_param!(params, "serial", String);
let secret = get_param!(params, "secret", String);
(ssid, passphrase, API, WS, serial, secret)
(ssid, passphrase, api, ws, serial, secret)
};
// Handle writing files
let json_path = Path::new("/data/kit_config.json");
Expand Down Expand Up @@ -245,7 +245,7 @@ fn connect(req: &mut Request) -> IronResult<Response> {
}}
}}
}}
}}", API, WS, serial, secret);
}}", api, ws, serial, secret);

// Write the text string to `file`, returns `io::Result<()>`
match file.write_all(output_text.as_bytes())
Expand Down
8 changes: 4 additions & 4 deletions ui/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,15 @@ <h3>Hi! Please choose your wifi from the list.</h3>
</div>
</div>
<div class="form-group">
<label for="API" class="control-label col-lg-2">Enter your API url</label>
<label for="api" class="control-label col-lg-2">Enter your API url</label>
<div class="col-lg-6">
<input type='text' class="form-control" name='API' value="https://my.astroplant.io/api/"></input>
<input type='text' class="form-control" name='api' value="https://my.astroplant.io/api/"></input>
</div>
</div>
<div class="form-group">
<label for="WS" class="control-label col-lg-2">Enter your web socket url</label>
<label for="ws" class="control-label col-lg-2">Enter your web socket url</label>
<div class="col-lg-6">
<input type='text' class="form-control" name='WS' value="wss://my.astroplant.io/"></input>
<input type='text' class="form-control" name='ws' value="wss://my.astroplant.io/"></input>
</div>
</div>
<div class="form-group">
Expand Down

0 comments on commit 22f806c

Please sign in to comment.