Sprankelprachtig aan/afmeldsysteem

people_controller.rb 468B

1234567891011121314151617181920212223
  1. class Api::PeopleController < ApiController
  2. before_action :set_person, only: [:show]
  3. before_action :api_require_admin! # Normal people should use /me
  4. # GET /api/people
  5. # GET /api/people.json
  6. def index
  7. @people = Person.all
  8. end
  9. # GET /api/people/1
  10. # GET /api/people/1.json
  11. def show
  12. 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