Skip to content

Changing a request would require changes in 3 places of the code, is there a better solution? #127

Description

@Nikola-Milovic

Hi, as it stands, if we want to change what parameters our client sends us, eg instead of this

export interface IUserInputDTO {
  name: string;
  email: string;
  password: string;
}

We suddenly need

export interface IUserInputDTO {
  name: string;
  email: string;
  password: string;
birthday: string;
}

We would need to change mongoose schema, celebrate body schema and our interface. Is there a better way about this? Or at least add it so the compiler will complain and give us an auto-complete. Writing this three times without the IDE complaining would be really annoying.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions