Sprankelprachtig aan/afmeldsysteem

people_controller.rb 503B

123456789101112131415161718192021222324
  1. module Api
  2. class PeopleController < ApiController
  3. before_action :set_person, only: [:show]
  4. before_action :api_require_admin! # Normal people should use /me
  5. # GET /api/people
  6. # GET /api/people.json
  7. def index
  8. @people = Person.all
  9. end
  10. # GET /api/people/1
  11. # GET /api/people/1.json
  12. def show; end
  13. private
  14. # Use callbacks to share common setup or constraints between actions.
  15. def set_person
  16. @person = Person.find(params[:id])
  17. end
  18. end
  19. end