Skip to content

Commit

Permalink
Switch shows from name to title
Browse files Browse the repository at this point in the history
  • Loading branch information
cdainmiller committed Jun 22, 2019
1 parent 88531e1 commit 4c7e3e4
Showing 1 changed file with 25 additions and 8 deletions.
33 changes: 25 additions & 8 deletions app/controllers/json_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,42 +6,59 @@ def index
respond_with @feed
end

def episode
show = shows.select { |show| show.id == params[:id] }
show['episodes'] = [
{
},
{
}
]
render json: show
end

# List of temporary podcasts (will be updated to use data from DB)
def shows
@shows = [
[
{
id: 1,
name: 'Joe Rogan',
title: 'Joe Rogan',
imageUrl: 'https://upload.wikimedia.org/wikipedia/en/thumb/4/4b/The_Joe_Rogan_Experience_logo.jpg/220px-The_Joe_Rogan_Experience_logo.jpg'
},
{
id: 2,
name: 'Accidental Tech Podcast',
title: 'Accidental Tech Podcast',
imageUrl: 'https://pbs.twimg.com/profile_images/418453319385120769/yrjxadhc.jpeg'
},
{
id: 3,
name: "Start Here: Ruby on Rails",
title: "Start Here: Ruby on Rails",
imageUrl: 'https://i1.sndcdn.com/avatars-000227601719-zmd5i2-original.jpg'
},
{
id: 4,
name: "Ungeniused",
title: "Ungeniused",
imageUrl: "https://relayfm.s3.amazonaws.com/uploads/broadcast/image_2x/28/ungeniused_artwork.png"
},
{
id: 5,
name: 'Mac Power Users',
title: 'Mac Power Users',
imageUrl: 'https://relayfm.s3.amazonaws.com/uploads/broadcast/image_2x/16/mpu_artwork.png'
},
{
id: 6,
name: 'Material',
title: 'Material',
imageUrl: 'https://relayfm.s3.amazonaws.com/uploads/broadcast/image_2x/19/material_artwork.png'
},
{
id: 7,
name: 'Download',
title: 'Download',
imageUrl: 'https://relayfm.s3.amazonaws.com/uploads/broadcast/image_2x/38/download_artwork.png'
},
{
id: 8,
title: 'X-Files',
imageUrl: ''
}
]
render json: @shows
Expand Down

0 comments on commit 4c7e3e4

Please sign in to comment.