GithubHelp home page GithubHelp logo

svynct / ignite-delivery-prismaio Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 44 KB

API de entregar desenvolvida no curso Ignite - NodeJS da Rocketseat, utilizando o Prisma.IO como ORM

TypeScript 99.43% Shell 0.57%

ignite-delivery-prismaio's Introduction

Overview

Essa é uma API desenvolvida com Express, Typescript e Prisma.IO que simula um backend de app de entregas.

Clients

POST /clients: Cria um novo cliente.

Body: { username: string, password: string }

POST /clients/authenticate: Autentica um cliente existente, retornando um token.

Body: { username: string, password: string }

GET /clients/deliveries: Retorna todas as entregas daquele cliente.

Headers: Authorization - Bearer { token }

Deliveryman

POST /deliveryman: Cria um novo entregador.

Body: { username: string, password: string }

POST /deliveryman/authenticate: Autentica um entregador existente, retornando um token.

Body: { username: string, password: string }

GET /deliveryman/deliveries: Retorna todas as entregas daquele entregador.

Headers: Authorization - Bearer { token }

Deliveries

POST /deliveries: Cria uma nova entrega.

Headers: Authorization - Bearer { token (de um cliente) }

Body: { item_name: string }

GET /deliveries: Retorna todas as entregas disponíveis para um entregador.

Headers: Authorization - Bearer { token (de um entregador) }

PUT /deliveries/:id: Atualiza o entregador da entrega passada na rota pelo usuário do token passado.

Headers: Authorization - Bearer { token (de um entregador) }

id: ID da entrega alvo.

PUT /deliveries/complete/:id: Finaliza a entrega especificada na rota.

Headers: Authorization - Bearer { token (de um entregador) }

id: ID da entrega alvo.

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.