Make the code a bit cleaner
This commit is contained in:
parent
59b3d56a94
commit
07d9734ba0
13
cv
13
cv
@ -56,6 +56,8 @@ frame(){
|
|||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
result(){
|
result(){
|
||||||
|
frame top
|
||||||
|
title "Queried at: $date"
|
||||||
frame up
|
frame up
|
||||||
frame table
|
frame table
|
||||||
out Total cases
|
out Total cases
|
||||||
@ -102,21 +104,10 @@ then
|
|||||||
ydate=$(date -d "2 days ago" $dfmt)
|
ydate=$(date -d "2 days ago" $dfmt)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
frame top
|
|
||||||
title "Queried at: $date"
|
|
||||||
if [ ! -z "$country" ]
|
if [ ! -z "$country" ]
|
||||||
then
|
then
|
||||||
# This is to be phased out in favor of worldwide stats
|
|
||||||
# in the else statement.
|
|
||||||
if [ "$country" == "all" ]
|
|
||||||
then
|
|
||||||
endpoint=all
|
|
||||||
country=world
|
|
||||||
result
|
|
||||||
else
|
|
||||||
endpoint=countries/$country
|
endpoint=countries/$country
|
||||||
result
|
result
|
||||||
fi
|
|
||||||
else
|
else
|
||||||
endpoint=all
|
endpoint=all
|
||||||
country=world
|
country=world
|
||||||
|
Reference in New Issue
Block a user