```ruby
get '/questions/index' do
  json questions: @user.questions
end

post '/questions' do
  @user.questions << Question.create(params['question'])

  json question: @user.questions.last
end

delete '/questions/:id' do

end```

Set Paths to Return All Questions to Coach View
user
```ruby
get '/questions/index' do
  if @user.access == 'student'
    json questions: @user.questions
  elsif @user.access == 'coach'
    json questions: Question.all
  end
end

post '/questions' do
  @user.questions << Question.create(params['question'])

  json question: @user.questions.last
end

delete '/questions/:id' do

end```
assistant