Changeset 693


Ignore:
Timestamp:
Jul 22, 2010, 10:41:00 AM (6 years ago)
Author:
jahn
Message:

Updated rest service "getAssay" to also transmit the Assay's name which had so far been unimportant.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/controllers/RestController.groovy

    r659 r693  
    8181                if( params.externalStudyID ) {
    8282                        def study = Study.find( "from Study as s where s.code=?", [params.externalStudyID])
    83                         if(study) study.assays.each{ assay -> assays.push assay.externalAssayID }
     83                        if(study) study.assays.each{ assay ->
     84                            def map = ['name':assay.name, 'externalAssayID':assay.externalAssayID]
     85                                assays.push( map )
     86                        }
    8487                }
    8588                render assays as JSON
     
    98101                if( params.externalAssayID ) {
    99102                        def id = Long.parseLong(params.externalAssayID)
    100                         Assay.findAll().each{ println it }
    101103                        def assay = Assay.find( "from Assay as a where externalAssayID=?",[id])
    102                         println "Assay: " + assay
    103104                        assay.getSamples().each { sample ->
    104105                                def item = [
     
    113114                        }
    114115                }
    115                 println "done"
    116116                render items as JSON
    117117        }
Note: See TracChangeset for help on using the changeset viewer.