Skip to content

Commit

Permalink
finally
Browse files Browse the repository at this point in the history
  • Loading branch information
amankrokx committed Jun 3, 2021
1 parent a0b8c71 commit bb271c9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions backend/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ let getdata = async(viaID, param, name, uid) => {
quality: "highestaudio"
});
//console.log(videoInfo.videoDetails)
console.log(audioFormat)
//console.log(audioFormat)

database.ref('audio/'+videoInfo.videoDetails.videoId).once('value').then((snapshot) => {
let v = snapshot.val()
Expand Down Expand Up @@ -276,7 +276,7 @@ let getdata = async(viaID, param, name, uid) => {
database.ref('command/sta').update({
'loadingState': 'false'
})
return

database.ref('audio/'+videoInfo.videoDetails.videoId).set({
'url': downloadURL,
'data': {
Expand Down
4 changes: 2 additions & 2 deletions frontend/public/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ window.onload = () => {
let id = await extractID(query)
if (id && id[1].length > 0) {
//console.log(id[1])
fetch('http://localhost:4001/getAudioUrl?vid=' + id[1] + '&name=' + encodeURI(myuser.displayName) + '&uid=' + encodeURI(myuser.uid)).then(res => {
fetch('https://krokxtream-api.herokuapp.com/getAudioUrl?vid=' + id[1] + '&name=' + encodeURI(myuser.displayName) + '&uid=' + encodeURI(myuser.uid)).then(res => {
return res.json()
}).then(song => {
writeTo(song, currentGroup, true)
Expand Down Expand Up @@ -275,7 +275,7 @@ window.onload = () => {

// Fetch song ID from query with rapidapi
let playQuery = (query) => {
fetch('http://localhost:4001/getAudioUrl?search=' + encodeURI(query) + '&name=' + encodeURI(myuser.displayName) + '&uid=' + encodeURI(myuser.uid))
fetch('https://krokxtream-api.herokuapp.com/getAudioUrl?search=' + encodeURI(query) + '&name=' + encodeURI(myuser.displayName) + '&uid=' + encodeURI(myuser.uid))
.then(res => {
return res.json()
})
Expand Down

0 comments on commit bb271c9

Please sign in to comment.