not able to use increment in payload :update api

default discord avatar
abdullahasad7253
2 weeks ago
1

const userKeywords=['coding','music']


const resKeywords = await payload.update({


collection: "keywords",


where: {


keyword:{ in:userKeywords },


},


data: {


$inc:{weight:1}


},


});


console.log(resKeywords)

  • discord user avatar
    denolfe
    Payload Team
    2 weeks ago

    That type of operation is not supported by the API

Open the post
Continue the discussion in Discord
Like what we're doing?
Star us on GitHub!

Star

Connect with the Payload Community on Discord

Discord

online

Can't find what you're looking for?

Get help straight from the Payload team with an Enterprise License.