Giter Club home page Giter Club logo

rest-api-sql-v3's Introduction

rest-api-sql-v3

You are looking at a fully functioning REST API built with Express and the Sequelize ORM.

To get running:

  • Download source
  • cd to source
  • npm install
  • npm run seend to get db populated
  • npm start

I have implemented the Exceeds Expectations project requirements including:

  • Ensure User Email Address is Valid and Unique
    • Add validation to the emailAddress attribute in the User model to ensure that the provided email address is properly formatted.
    • Add the unique constraint to the User model to ensure that the provided email address isn't already associated with an existing user.
  • Update the User Routes
    • Update the /api/users GET route so that the following properties are filtered out of the response:
      • password
      • createdAt
      • updatedAt
    • Update the /api/users POST route to check for and handle SequelizeUniqueConstraintError errors.
      • If a SequelizeUniqueConstraintError is thrown a 400 HTTP status code and an error message should be returned.
  • Update the Course Routes
    • Update the /api/courses and /api/courses/:id GET routes so that the following properties are filtered out of the response:
      • createdAt
      • updatedAt
    • Update the /api/courses/:id PUT and /api/courses/:id DELETE routes to ensure that the currently authenticated user is the owner of the requested course.
      • If the currently authenticated user is not the owner of the requested course a 403 HTTP status code should be returned.

rest-api-sql-v3's People

Contributors

xyeres avatar

Watchers

 avatar  avatar

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.