GithubHelp home page GithubHelp logo

Comments (11)

shekcon avatar shekcon commented on July 19, 2024

Can u give me more information about that ?

from nestjs-api.

1101916341 avatar 1101916341 commented on July 19, 2024

你可以给我更多相关信息吗?

您的项目在build的时候,有一个.ts文件在判断时,有一个 number类型的 id 和 string类型id做判断,nest自动判断出是不对等关系,而且我没有看到您项目中的数据库连接的配置文件和配置信息

from nestjs-api.

shekcon avatar shekcon commented on July 19, 2024

Please attach that file into comment so I can understand what problem is ? Or example code about What u want ?

from nestjs-api.

1101916341 avatar 1101916341 commented on July 19, 2024

请将该文件附加到评论中,以便了解问题是什么?或者关于你想要什么的示例代码?

/src/modules/auth/guards/claim.guard.ts 这个路径下

canActivate(context: ExecutionContext): boolean {
const hasClaim = (claim: any, req: IRequest): boolean =>
req.params.id == req.user.id; // 这里的判断有问题,执行在这里就会出错
return validate(AuthType.Claim, hasClaim, this.reflector, context);
}

from nestjs-api.

1101916341 avatar 1101916341 commented on July 19, 2024

请将该文件附加到评论中,以便了解问题是什么?或者关于你想要什么的示例代码?

您那边方便做一个线上的demo 出来吗?就是连接能访问的

from nestjs-api.

shekcon avatar shekcon commented on July 19, 2024

Did u test online here ?
https://nestjs-api-shekcon.herokuapp.com/api/

from nestjs-api.

1101916341 avatar 1101916341 commented on July 19, 2024

Did u test online here ?
https://nestjs-api-shekcon.herokuapp.com/api/

您好,这里确实没有体验过,但是关于代码运行报错的问题您看下是什么情况啊

from nestjs-api.

1101916341 avatar 1101916341 commented on July 19, 2024

Did u test online here ?
https://nestjs-api-shekcon.herokuapp.com/api/

您好,这里确实没有体验过,但是关于代码运行报错的问题您看下是什么情况啊

您用的数据库是mysql 还是mongoDB啊

from nestjs-api.

shekcon avatar shekcon commented on July 19, 2024

My app use PostgreSQL on heroku

from nestjs-api.

shekcon avatar shekcon commented on July 19, 2024

Can u show screenshot about your error ?

from nestjs-api.

shekcon avatar shekcon commented on July 19, 2024

If you use mongoDB then you need redesign whole code about entity because TypeORM works with mongodb quite different with SQL. U can read docs on typeorm website. typeorm with mongodb

from nestjs-api.

Related Issues (1)

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.