not able to use increment in payload :update api

default discord avatar
abdullahasad725311 months 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
    11 months ago

    That type of operation is not supported by the API

Star on GitHub

Star

Chat on Discord

Discord

online

Can't find what you're looking for?

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