Code Monkey home page Code Monkey logo

Comments (8)

anand-harsh avatar anand-harsh commented on June 23, 2024 2
image

in courseRoutes.js file there are only two routes defined

Then make it.

from edumi.

Anushkabh avatar Anushkabh commented on June 23, 2024

@anand-harsh i would like to work on this. kindly assign under JWOC

from edumi.

Divyanshgarg-04 avatar Divyanshgarg-04 commented on June 23, 2024

@anand-harsh I would love to work on this issue under JWOC. Van you please assign this issue to me

from edumi.

Divyanshgarg-04 avatar Divyanshgarg-04 commented on June 23, 2024

@anand-harsh /course/:id route is not defined

from edumi.

anand-harsh avatar anand-harsh commented on June 23, 2024

@anand-harsh /course/:id route is not defined

In API (backend)

from edumi.

Divyanshgarg-04 avatar Divyanshgarg-04 commented on June 23, 2024
image

in courseRoutes.js file there are only two routes defined

from edumi.

Divyanshgarg-04 avatar Divyanshgarg-04 commented on June 23, 2024

@anand-harsh It should be get request rather than post?

from edumi.

anand-harsh avatar anand-harsh commented on June 23, 2024

@anand-harsh It should be get request rather than post?

We are not making crud operation here so no need of post or get. We are making middleware which will be later used in get or post request routes to limit the access of normal user to that route.

Here what you can do is, take token from cookie, decode that token to get id, check the role for that id, if the role of that id is admin, return next() else return ErrorHandler("cant access") with a status code.

Hope you get it

from edumi.

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.