Coder Social home page Coder Social logo

buyable's People

Stargazers

 avatar

Watchers

 avatar  avatar

buyable's Issues

[/api/auth/login] Add login route

  • look up user in database
  • encrypt password & check with DB password (bcrypt.compare)
  • put user in session if password matches
  • return 401 if password doesn't match/user is not in DB

API TESTS

User

  • /user/new POST
  • /user GET
  • /user PATCH
  • /user DELETE
  • /user/new POST FAIL
  • /user GET FAIL
  • /user PATCH FAIL
  • /user DELETE FAIL

Group

  • /group GET
  • /group PATCH
  • /group/new POST
  • /group/items GET
  • (/group DELETE)
  • /group GET FAIL
  • /group PATCH FAIL
  • /group/new POST FAIL
  • /group/items GET FAIL
  • (/group DELETE FAIL)

Auth

  • /auth/login POST
  • /auth/logout GET
  • /auth/login POST FAIL (wrong credentials, credentials missing)
  • /auth/logout GET FAIL (not logged in)
  • /auth/check

Item

  • /item/new POST
  • /item GET
  • /item PATCH
  • /item DELETE
  • (/item/search GET)
  • /item/new POST FAIL
  • /item GET FAIL
  • /item PATCH FAIL
  • /item DELETE FAIL
  • (/item/search GET FAIL)

Add User Profile Page

  • Add nested routing
  • Add user profile page (for modifying user info)
  • Add user settings page (for adjusting preferences not related to user info)
  • Add items page (for managing own(!!) items)
  • Add groups page (for managing own(!!) groups)

Main Timeline View

  1. Read all groupids from user store
  2. Get items from groups /items GET
  3. Display in cards

[/item UPDATE]

  • Update item doc
  • Update group docs if item get's added/removed from groups

[/group/items GET] get items in group

  1. Query param: amount( default: 5), sortby(default: createdAt Date)
  2. Look up top 5 items in group by sortBy param
  3. For each item, get Item object from DB
  4. Map item objects to array, send back to client

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.