I'm not sure why i'm having this weird error. I'm using route.put and selected PUT on my post man.
Here's my post man error: Image link->https://ibb.co/dzvAKc
All of my musics on my mongoDB data: Image link->https://ibb.co/d9TY5H
Routes:
const User = require('../models/user');
const Music = require('../models/music');
const jwt = require('jsonwebtoken');
const config = require('../config/database.js');
module.exports = (router) => {
Update function:
router.put('/updateMusic', (req, res) => {
if (!req.body._id) {
res.json({ success: false, message: 'No music id provided.'});
}
else { .. more authentications here }
return router;
};
Somehow it can't get pass that 1st if.
[UPDATE] :
Here's the img for the headers-> https://ibb.co/mGr9vH