Changeset 2222


Ignore:
Timestamp:
Apr 25, 2012, 12:10:19 AM (5 years ago)
Author:
work@…
Message:

one return statement instead of two

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/services/api/ApiService.groovy

    r2217 r2222  
    7070     */
    7171    def validateRequest(String deviceID, String validation) {
     72        def validated = false
     73
    7274        // disable validation check on development and ci
    7375        if (['development', 'ci'].contains(grails.util.GrailsUtil.environment)) {
     
    8890
    8991            // check if the validation confirms
    90             return (validation == validationSum)
    91         } else {
    92             // no such token, re-authenticate
    93             return false
    94         }
     92            validated = (validation == validationSum)
     93        }
     94
     95        return validated
    9596    }
    9697
Note: See TracChangeset for help on using the changeset viewer.