scnario commited on
Commit
55e8541
·
verified ·
1 Parent(s): 019cb1f

Update server.js

Browse files
Files changed (1) hide show
  1. server.js +3 -4
server.js CHANGED
@@ -1,6 +1,6 @@
1
  const express = require('express');
2
  const axios = require('axios');
3
- const spot = require('./lib/spotify.js');
4
 
5
  const app = express()
6
  const PORT = 7860
@@ -12,9 +12,8 @@ const stringify = (value) => {
12
  app.all('/play', async(req, res) => {
13
  const { q } = req.query || req.body
14
  if(!q) return res.json(stringify({ status: false, error: '"q" parameter is undefined!'}))
15
-
16
- const spotify = new spot()
17
- const search = await spotify.search(q, 1)
18
  console.log(stringify(search))
19
  })
20
 
 
1
  const express = require('express');
2
  const axios = require('axios');
3
+ const Spotify = require('./lib/spotify.js');
4
 
5
  const app = express()
6
  const PORT = 7860
 
12
  app.all('/play', async(req, res) => {
13
  const { q } = req.query || req.body
14
  if(!q) return res.json(stringify({ status: false, error: '"q" parameter is undefined!'}))
15
+
16
+ const search = await Spotify.search(q, 1)
 
17
  console.log(stringify(search))
18
  })
19