demarches-normaliennes/app/controllers/api_geo_test_controller.rb

14 lines
292 B
Ruby
Raw Normal View History

class APIGeoTestController < ActionController::Base
def regions
render json: [{ nom: 'Martinique' }]
end
def departements
render json: [{ nom: 'Aisne', code: '02' }]
end
def communes
2020-10-07 17:44:21 +02:00
render json: [{ nom: 'Ambléon', code: '01006', codesPostaux: ['01300'] }]
end
end