Fix run.sh

This commit is contained in:
folex 2019-08-18 14:58:33 +03:00
parent 4a5d20343b
commit 730a46a9a8
3 changed files with 7 additions and 6 deletions

View File

@ -28,8 +28,9 @@ echo
sleep 1 && (docker logs -f frun 2>&1 &) | grep -q initialized && sleep 1
# Send our username to the application
echo -e "Sending request..."
echo "curl -s 'http://localhost:30000/apps/1/tx' --data $'sessionId/0\n'$USER --compressed"
REQUEST="$USER"
echo -e "Sending request: $REQUEST"
echo "curl -s 'http://localhost:30000/apps/1/tx' --data $'sessionId/0\n'"$REQUEST" --compressed"
echo
RESPONSE=$(curl -s 'http://localhost:30000/apps/0/tx' --data $'sessionId/0\n'"$REQUEST" --compressed)

View File

@ -9,7 +9,7 @@ pub fn query(query: &str) -> AppResult<String> {
// Log if there's an error
if result_str.is_err() {
log::error!("unable to decode result from bytes: {:#x?}", bytes);
log::error!("unable to decode result from bytes: {:#x?}", response);
}
// Wrap error with a better message, and return Result
@ -17,7 +17,7 @@ pub fn query(query: &str) -> AppResult<String> {
.map_err(|e| {
err_msg(&format!(
"unable to decode result from bytes {:#x?}: {}",
query, e
response, e
))
})
.map(|s| s.to_string())

View File

@ -9,7 +9,7 @@ pub fn query(query: &str) -> AppResult<String> {
// Log if there's an error
if result_str.is_err() {
log::error!("unable to decode result from bytes: {:#x?}", bytes);
log::error!("unable to decode result from bytes: {:#x?}", response);
}
// Wrap error with a better message, and return Result
@ -17,7 +17,7 @@ pub fn query(query: &str) -> AppResult<String> {
.map_err(|e| {
err_msg(&format!(
"unable to decode result from bytes {:#x?}: {}",
query, e
response, e
))
})
.map(|s| s.to_string())