Giter VIP home page Giter VIP logo

build-sprint-dev-libs-reusable-be's Introduction

Dev Libs Backend

Endpoints

Auth

POST /api/auth/register

Expected Payload

{
	"username": "John Doe",
	"password": "password123!"
}

Returns

{
  "username": "John Doe"
}

POST /api/auth/login

Expected Payload

{
	"username": "John Doe",
	"password": "password123!"
}

Returns

{
  "userId": 1,
  "username": "John Doe",
  "token": "uyJhbGciOiJIUzI1NiIshnR5cCI6IkpXVCJ9.eyJzdWJqZWN0IjoxLCJ1c2VyrCsFtZSI6ImFkbWluIiwiaWF0IjoxNTcxNzEwMDA4LCJleHAiOjE1NzR4OTY0MDh9.vNfxryaHCkhsZ1I1jJHmH4iscWxV38FGvEyJEtKPBHI"
}

devLIb

GET /api/devLib

Returns

All libs currently in the DB

{
  "data": [
    {
      "id": 5,
      "lib": "another extremely good madlib",
      "user_id": 2,
      "category_id": 3
    },
    {
      "id": 6,
      "lib": "and one more",
      "user_id": 2,
      "category_id": 1
    },
    {
      "id": 7,
      "lib": "and one more",
      "user_id": 2,
      "category_id": 1
    },
    {
      "id": 3,
      "lib": "updated libo",
      "user_id": 2,
      "category_id": 2
    },
    {
      "id": 9,
      "lib": "and one more",
      "user_id": 2,
      "category_id": 1
    },
    {
      "id": 10,
      "lib": "and one more",
      "user_id": 2,
      "category_id": 1
    },
    {
      "id": 11,
      "lib": "This a test",
      "user_id": 1,
      "category_id": 3
    }
  ]
}

POST /api/devLib

Expects

{
	"lib": "This a test",
	"user_id": 1,
	"category_id": 3
}

Returns

{
  "data": {
    "id": 11,
    "lib": "This a test",
    "user_id": 1,
    "category_id": 3
  }
}

PUT /api/devLib

Expects

{
	"id": 1,
	"lib": "This is the first post using postgres deployment...now edited",
	"user_id": 1,
	"category_id": 3
}

Returns

{
  "data": {
    "id": 1,
    "lib": "This is the first post using postgres deployment...now edited",
    "user_id": 1,
    "category_id": 3
  }
}

DELETE api/devLib/:id

Returns

{
  "data": {
    "id": 11,
    "lib": "This a test",
    "user_id": 1,
    "category_id": 3
  }
}

build-sprint-dev-libs-reusable-be's People

Contributors

acemouty avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

crystalbrock619

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.