How do you add the user or user id in a collection version that made the change

default discord avatar
christopher.nowlan10 months ago
2

I am just trying to add a user ID to a collection version so I can keep track who has made what changes

  • discord user avatar
    jarrod_not_jared
    10 months ago

    You could make a field that gets updated in a beforeChange hook, using the user on the req to set the value

  • default discord avatar
    christopher.nowlan10 months ago

    Thanks @Jarrod that worked a treat

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.