Skip to content

feat: allow to selectively update items#28

Merged
Guy7B merged 1 commit into
jitsecurity:mainfrom
Xavier59:patch-1
Aug 3, 2023
Merged

feat: allow to selectively update items#28
Guy7B merged 1 commit into
jitsecurity:mainfrom
Xavier59:patch-1

Conversation

@Xavier59
Copy link
Copy Markdown
Contributor

The DynamoDB paradigm is to have a single database per service.
This mean that a table can contain different kind of entities and often, you don't want to update all the entities.

This PR make it possible to selectively transform entries, e.g:

  const addNewFieldsToUser = (item) => {
    if (item.pk.startsWith("user#")) {
      const updatedItem = {
        ...item,
        surname: "Tom"
      };
      return updatedItem;
    }
    return undefined;

  };

@jit-ci
Copy link
Copy Markdown

jit-ci Bot commented Jul 19, 2023

Hi, I’m Jit, a friendly security platform designed to help developers build secure applications from day zero with an MVS (Minimal viable security) mindset.

In case there are security findings, they will be communicated to you as a comment inside the PR.

Hope you’ll enjoy using Jit.

Questions? Comments? Want to learn more? Get in touch with us.

Copy link
Copy Markdown
Collaborator

@Guy7B Guy7B left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! @Xavier59

Good idea

@Guy7B Guy7B merged commit 092d11b into jitsecurity:main Aug 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants