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