Code cleanup
This commit is contained in:
parent
b1f6b024fc
commit
ab566c6c84
|
@ -10,8 +10,7 @@ fun main(args: Array<String>) {
|
||||||
val app = express()
|
val app = express()
|
||||||
|
|
||||||
app.get("/crypto", { _, res ->
|
app.get("/crypto", { _, res ->
|
||||||
println(generateCryptoRates())
|
res.send(generateCryptoRates())
|
||||||
res.send(generateCryptoRates())
|
|
||||||
})
|
})
|
||||||
|
|
||||||
app.listen(3000, {
|
app.listen(3000, {
|
||||||
|
@ -19,8 +18,10 @@ fun main(args: Array<String>) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
fun generateCryptoRates(): Array<CryptoCurrency>{
|
fun generateCryptoRates(): Array<CryptoCurrency>{
|
||||||
val crytoCurrency = arrayOf<CryptoCurrency>(CryptoCurrency("Bitcoin",
|
val cryptoCurrency = arrayOf<CryptoCurrency>(
|
||||||
90000F), CryptoCurrency("ETH",1000F),
|
CryptoCurrency("Bitcoin", 90000F),
|
||||||
CryptoCurrency("TRX",10F));
|
CryptoCurrency("ETH",1000F),
|
||||||
return crytoCurrency
|
CryptoCurrency("TRX",10F)
|
||||||
|
);
|
||||||
|
return cryptoCurrency
|
||||||
}
|
}
|
Loading…
Reference in New Issue