Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

formatting

  • Loading branch information...
commit 5cec72900b6381aaf0ad291a43c58f4a264ef032 1 parent 80bc4d3
@clickonchris authored
Showing with 12 additions and 12 deletions.
  1. +12 −12 grails-app/controllers/grails/ws/demo/WeatherController.groovy
View
24 grails-app/controllers/grails/ws/demo/WeatherController.groovy
@@ -10,21 +10,21 @@ class WeatherController {
def index = {
def message
- if (params?.value && params.from) {
-
+ if (params?.value && params.from) {
+
def proxy = WebServiceClientFactory.getWeatherService()
- def result
+ def result
def to_units
- if ("Celcius".equals(params.from)) {
- result = proxy.CelsiusToFahrenheit(params.value)
+ if ("Celcius".equals(params.from)) {
+ result = proxy.CelsiusToFahrenheit(params.value)
to_units = "F"
- } else {
- result = proxy.FahrenheitToCelsius(params.value)
+ } else {
+ result = proxy.FahrenheitToCelsius(params.value)
to_units = "C"
- }
- message = "${params.value} degrees ${params.from} is ${result} degrees ${to_units}"
- }
+ }
+ message = "${params.value} degrees ${params.from} is ${result} degrees ${to_units}"
+ }
- flash.message = message
- }
+ flash.message = message
+ }
}
Please sign in to comment.
Something went wrong with that request. Please try again.