Giter VIP home page Giter VIP logo

auth-me's Introduction

Hi ๐Ÿ‘‹

I work for QA Wolf. We write and maintain end-to-end tests for web apps. If you're interested, check out qawolf.com

auth-me's People

Contributors

mattkleinsmith avatar

Watchers

 avatar  avatar

auth-me's Issues

Create a Spot

Create a Spot

Creates and returns a new spot.

  • An authenticated user is required for a successful response
  • New spot exists in the database after request
  • Spot data returned includes the id, ownerId, address, city,
    state, country, lat, lng, name, description, price, createdAt,
    and updatedAt
  • Error response with status 400 is given when body validations for the
    address, city, state, country, lat, lng, name, description, or price are violated

Spot - Update

Reuse Spot Creation form.
When clicking the edit button, set ui.spot.

Create a Review for a Spot based on the Spot's id

Create a Review for a Spot based on the Spot's id

Create and return a new review for a spot specified by id.

  • An authenticated user is required for a successful response
  • New review exists in the database after request
  • Review data returned includes the id, userId, spotId, review,
    stars, createdAt, and updatedAt
  • Error response with status 400 is given when body validations for the
    review or stars are violated
  • Error response with status 404 is given when a spot does not exist with
    the provided id
  • Error response with status 403 is given when a review already exists for
    the spot from the current user

Get all Reviews by a Spot's id

Get all Reviews by a Spot's id

Returns all the reviews that belong to a spot specified by id.

  • Seed data exists in the database for reviews to be returned.
  • Successful response includes only reviews for the specified spot
  • Review data returned includes the id, userId, spotId, review,
    stars, createdAt, and updatedAt
  • Review data returns associated data for User, including the id,
    firstName, and lastName
  • Review data returns associated data for ReviewImages, an array of image
    data including the id and url
  • Error response with status 404 is given when a spot does not exist with
    the provided id

Delete a Booking

Delete a Booking

Delete an existing booking.

  • An authenticated user is required for a successful response
  • Only the owner of the booking or the owner of the spot is authorized to
    delete the booking
  • Booking record is removed from the database after request
  • Success response includes a message indicating a successful deletion
  • Error response with status 404 is given when a spot does not exist with
    the provided id
  • Error response with status 400 is given when it is past the booking's
    startDate (no deleting of current or past bookings)

Authentication Required

Authentication Required

All endpoints that require a current user to be logged in receive a standard
authentication response.

  • Authentication middleware responds with error status 401 when
    authentication is not provided

Authorization Required

Authorization Required

All endpoints that require a current user to have the correct role(s) or
permission(s) receive a standard authorization response.

  • Authorization middleware responds with error status 403 when
    an authenticated user does not have the correct role(s) or permission(s)

Get details for a Spot from an id

Get details for a Spot from an id

Returns the details of a spot specified by its id.

  • Successful response includes data only for the specified spot
  • Spot data returned includes the id, ownerId, address, city,
    state, country, lat, lng, name, description, price, createdAt,
    and updatedAt
  • Spot data returns aggregate data for numReviews and avgStarRating
  • Spot data returns associated data for SpotImages, an array of image
    data including the id, url, and preview
  • Spot data returns associated data for Owner, including the id,
    firstName, and lastName
  • Error response with status 404 is given when a spot does not exist with
    the provided id

Quality assurance

  • Basic pass to find big errors
  • Authentication
  • Authorization
  • Exact response object pass

Get all Reviews of the Current User

Get all Reviews of the Current User

Returns all the reviews written by the current user.

  • An authenticated user is required for a successful response
  • Successful response includes only reviews created by the current user
  • Review data returned includes the id, userId, spotId, review,
    stars, createdAt, and updatedAt
  • Review data returns associated data for User, including the id,
    firstName, and lastName
  • Review data returns associated data for Spot, including the id,
    ownerId, address, city, state, country, lat, lng, name,
    price, and previewImage
  • Review data returns associated data for ReviewImages, an array of image
    data including the id and url

Add Query Filters to Get All Spots

Add Query Filters to Get All Spots

Return spots filtered by query parameters.

  • Query parameters are accepted for page, size, minLat, maxLat,
    minLng, maxLng, minPrice, and maxPrice
  • Default values are provided for the page and size parameters
  • Successful response includes only spots in the database that meet the
    specified query parameters criteria.
  • Spot data returned includes the id, ownerId, address, city,
    state, country, lat, lng, name, description, price, createdAt,
    updatedAt, and previewImage for each spot
  • Successful response includes the page and size of the returned payload
  • Error response with status 400 is given when query parameter validations
    for the page, size, minLat, maxLat, minLng, maxLng, minPrice, or
    maxPrice are violated

Sign Up a User (Feature 0)

Sign Up a User (Feature 0)

Creates a new user, logs them in as the current user, and returns the current
user's information.

  • New user exists in the database after request
  • Successful response includes newly created id, firstName, lastName,
    email, and token
  • Error response with status 403 is given when the specified email already
    exists
  • Error response with status 400 is given when body validations for the
    email, firstName, or lastName are violated

Get all Spots owned by the Current User

Get all Spots owned by the Current User

Returns all the spots owned (created) by the current user.

  • An authenticated user is required for a successful response
  • Successful response includes only spots created by the current user
  • Spot data returned includes the id, ownerId, address, city,
    state, country, lat, lng, name, description, price, createdAt,
    updatedAt, previewImage, and avgRating

Delete an Image for a Review

Delete an Image for a Review

Delete an existing image for a Review.

  • An authenticated user is required for a successful response
  • Only the owner of the review is authorized to delete
  • Image record is removed from the database after request
  • Success response includes a message indicating a successful deletion
  • Error response with status 404 is given when a review image does not exist
    with the provided id

Get all Bookings for a Spot based on the Spot's id

Get all Bookings for a Spot based on the Spot's id

Return all the bookings for a spot specified by id.

  • An authenticated user is required for a successful response
  • Seed data exists in the database for bookings to be returned.
  • Successful response includes only bookings for the specified spot
  • If you are NOT the owner of the spot, booking data returned includes the
    spotId, startDate, and endDate for each booking
  • If you ARE the owner of the spot, booking data returned includes the id
    spotId, userId, startDate, endDate, createdAt, and updatedAt for
    each booking
  • If you ARE the owner of the spot, booking data returns associated data for
    User, including the id, firstName, and lastName
  • Error response with status 404 is given when a spot does not exist with
    the provided id

Get all of the Current User's Bookings

Get all of the Current User's Bookings

Return all the bookings that the current user has made.

  • An authenticated user is required for a successful response
  • Successful response includes only bookings created by the current user
  • Booking data returned includes the id, spotId, userId, startDate,
    endDate, createdAt, and updatedAt
  • Booking data returns associated data for Spot, including the id,
    ownerId, address, city, state, country, lat, lng, name,
    price and previewImage

Edit a Booking

Edit a Booking

Update and return an existing booking.

  • An authenticated user is required for a successful response
  • Only the owner of the booking is authorized to edit
  • Booking record is updated in the database after request
  • Booking data returned includes the id, userId, spotId, startDate,
    endDate, createdAt, and updatedAt
  • Error response with status 404 is given when a booking does not exist with
    the provided id
  • Error response with status 400 is given when it is past the booking's
    endDate (no editing of past bookings)
  • Error response with status 403 is given when a booking already exists for
    the spot on the specified dates

Edit a Review

Edit a Review

Update and return an existing review.

  • An authenticated user is required for a successful response
  • Only the owner of the review is authorized to edit
  • Review record is updated in the database after request
  • Review data returned includes the id, userId, spotId, review,
    stars, createdAt, and updatedAt
  • Error response with status 400 is given when body validations for the
    review, or stars are violated
  • Error response with status 404 is given when a review does not exist with
    the provided id

Edit a Spot

Edit a Spot

Updates and returns an existing spot.

  • An authenticated user is required for a successful response
  • Only the owner of the spot is authorized to edit
  • Spot record is updated in the database after request
  • Spot data returned includes the id, ownerId, address, city,
    state, country, lat, lng, name, description, price, createdAt,
    and updatedAt
  • Error response with status 400 is given when body validations for the
    address, city, state, country, lat, lng, name, description, or price are violated
  • Error response with status 404 is given when a spot does not exist with
    the provided id

Get all Spots

Get all Spots

Returns all the spots.

  • Seed data exists in the database for spots to be returned.
  • Successful response includes each spot in the database.
  • Spot data returned includes the id, ownerId, address, city,
    state, country, lat, lng, name, description, price, createdAt,
    updatedAt, previewImage, and avgRating

Delete an Image for a Spot

Delete an Image for a Spot

Delete an existing image for a Spot.

  • An authenticated user is required for a successful response
  • Only the owner of the spot is authorized to delete
  • Image record is removed from the database after request
  • Success response includes a message indicating a successful deletion
  • Error response with status 404 is given when a spot image does not exist
    with the provided id

Get the Current User (Feature 0)

Get the Current User (Feature 0)

Returns the information about the current user that is logged in.

  • An authenticated user is required for a successful response
  • Successful response includes the user's id, firstName, lastName, username, and
    email

Create a Booking from a Spot based on the Spot's id

Create a Booking from a Spot based on the Spot's id

Create and return a new booking from a spot specified by id.

  • An authenticated user is required for a successful response
  • A user is only authorized to create a booking if they do NOT own the spot
  • New booking exists in the database after request
  • Booking data returned includes the id, userId, spotId, startDate,
    endDate, createdAt, and updatedAt
  • Error response with status 404 is given when a spot does not exist with
    the provided id
  • Error response with status 403 is given when a booking already exists for
    the spot on the specified dates

Add an Image to a Spot based on the Spot's id

Add an Image to a Spot based on the Spot's id

Create and return a new image for a spot specified by id.

  • An authenticated user is required for a successful response
  • Only the owner of the spot is authorized to add an image
  • New image exists in the database after request
  • Image data returned includes the id, url, and preview
  • Error response with status 404 is given when a spot does not exist with
    the provided id

Add an Image to a Review based on the Review's id

Add an Image to a Review based on the Review's id

Create and return a new image for a review specified by id.

  • An authenticated user is required for a successful response
  • Only the owner of the review is authorized to add an image
  • New image exists in the database after request
  • Image data returned includes the id and url
  • Error response with status 404 is given when a review does not exist with
    the provided id
  • Error response with status 400 is given when the maximum number of images
    have been added for the review

Delete a Review

Delete a Review

Delete an existing review.

  • An authenticated user is required for a successful response
  • Only the owner of the review is authorized to delete
  • Review record is removed from the database after request
  • Success response includes a message indicating a successful deletion
  • Error response with status 404 is given when a spot does not exist with
    the provided id

Review - Create

  • Don't let owner review their own spot
  • Don't show Leave Review if already left one
  • Show errors
  • Word wrap reviews
  • Scroll to the bottom

Delete a Spot

Delete a Spot

Deletes an existing spot.

  • An authenticated user is required for a successful response
  • Only the owner of the spot is authorized to delete
  • Spot record is removed from the database after request
  • Success response includes a message indicating a successful deletion
  • Error response with status 404 is given when a spot does not exist with
    the provided id

Log In a User (Feature 0)

Log In a User (Feature 0)

Logs in a current user with valid credentials and returns the current user's
information.

  • Successful response includes the user's id, firstName, lastName,
    email, and token
  • Error response with status 401 is given when invalid credentials are given
  • Error response with status 400 is given when body validations for the
    email, firstName, or lastName are violated

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.