import { Router } from 'express';
import {
  lookupSpotifyTrack,
  listSongs,
  getSong,
  createSong,
  updateSong,
  deleteSong,
} from '../controllers/songController.js';
import { requireAuth } from '../middleware/auth.js';

const router = Router();

router.use(requireAuth);

router.post('/lookup', lookupSpotifyTrack);
router.get('/', listSongs);
router.get('/:id', getSong);
router.post('/', createSong);
router.put('/:id', updateSong);
router.delete('/:id', deleteSong);

export default router;
