Skip to content

Commit

Permalink
rename api calls
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelKreil committed Jul 28, 2017
1 parent f28e922 commit 90a2bc9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions bin/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ app.get('/api/getvideos', (req, res) =>
))
)

app.get('/api/playvideo/:name', (req, res) =>
app.get('/api/play/:name', (req, res) =>
playlist.getVideo(req.params.name).play(result =>
res.status(200).json(result)
)
)

app.get('/api/stopvideo', (req, res) =>
app.get('/api/stop', (req, res) =>
playlist.stop(result =>
res.status(200).json(result)
)
Expand Down
2 changes: 1 addition & 1 deletion web/assets/script/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ $(function () {
}, 80)

function play(video) {
$.getJSON('/api/playvideo/'+video.title, function (response) {
$.getJSON('/api/play/'+video.title, function (response) {
console.log(response);
})
}
Expand Down

0 comments on commit 90a2bc9

Please sign in to comment.