GithubHelp home page GithubHelp logo

Comments (6)

rbnayax avatar rbnayax commented on May 3, 2024 1

@tolgap it shouldn't matter, but it was abused :-(

I suggest a diffrent thing:

export enum RpcParamtype {
  PAYLOAD = RouteParamtypes.BODY,
  CONTEXT = RouteParamtypes.HEADERS,
  GRPC_CALL = RouteParamtypes.FILES,
}

Working on a PR now.

from nest.

kamilmysliwiec avatar kamilmysliwiec commented on May 3, 2024

cc @tolgap 👀

from nest.

rbnayax avatar rbnayax commented on May 3, 2024

Same issue for RPC. RpcParamtype.CONTEXT value 6 used to be mapped to RouteParamtypes.HEADERS which was mapped to custom in ParamsTokenFactory . Now it is mapped to RouteParamtypes.PARAM.
The mentioned commit did introduce this regression but I think the issue here is not related to it, but to the fact that there is some sort of dependency between enum values across the packages which is not correct, and not enforced correctly. @kamilmysliwiec thoughts?

from nest.

rbnayax avatar rbnayax commented on May 3, 2024

The type coercion here is the culprit

const token = this.paramsTokenFactory.exchangeEnumForString(
type as any as RouteParamtypes,
);

from nest.

tolgap avatar tolgap commented on May 3, 2024

Wasn't aware that the position was this important for this. @kamilmysliwiec do we revert in the meantime then come back to this?

from nest.

rbnayax avatar rbnayax commented on May 3, 2024

@tolgap opened #13351 this should revert to the original behavior

from nest.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.