Coder Social home page Coder Social logo

contacts-back's Introduction

contacts-back

customer-base Este é um aplicativo no qual você pode gerenciar seus contatos de maneira simples e fácil.

Rodando localmente Clone o projeto

  [email protected]:Victor-Novakoski/contacts-back.git

Entre no diretório do projeto

  cd customer-base-backEnd

ou

  code .

Instale as dependências

  yarn

iniciar as migrações

  npm run typeorm migration:generate ./src/migrations/InitialMigration -- -d ./src/data-source.ts
  npm run typeorm migration:run -- -d ./src/data-source

Inicie o servidor

  yarn dev

Login

  /auth

body

{
	"email":"[email protected]",
	"password":"123456"
}

status 200

{
"token": "token"
}

Rota

  /user

create

body

{
	"name": "teste1111",
	"email": "[email protected]",
	"password": "1234",
	"phone": "4199999999"
}

status 204

{
	"updatedAt": "2023-03-24T22:44:29.813Z",
	"createdAt": "2023-03-24T22:44:29.813Z",
	"isActive": true,
	"isAdm": false,
	"imageProfile": "https://argumentumpericias.com.br/biblioteca/2019/09/sem-imagem-avatar.png",
	"phone": "4199999999",
	"email": "[email protected]",
	"name": "teste",
	"id": "958a577e-1715-43c2-8ec5-84f91c1f0ffa"
}

get

status 200

[
	{
		"imageProfile": "https://www.omegascopio.com.br/wp-content/uploads/2022/09/Genshin-Impact-anime.jpg",
		"updatedAt": "2023-03-24T22:58:42.119Z",
		"createdAt": "2023-03-24T22:58:42.119Z",
		"isAdm": false,
		"isActive": true,
		"phone": "99 9999 9999",
		"email": "[email protected]",
		"name": "teste",
		"id": "9d531bf2-28b6-423f-a344-2d59b3bbd98a"
	}
]

rota

  /users/profile

get

status 200

{
	"id": "9d531bf2-28b6-423f-a344-2d59b3bbd98a",
	"name": "teste",
	"email": "[email protected]",
	"imageProfile": "https://www.omegascopio.com.br/wp-content/uploads/2022/09/Genshin-Impact-anime.jpg",
	"phone": "99 9999 9999"
}

patch

body

"name":""
"email":""
"password":""
"imageProfile":""
"phone":""

status 200

{
	"updatedAt": "2023-03-26T21:55:24.494Z",
	"createdAt": "2023-03-24T22:58:42.119Z",
	"isActive": true,
	"isAdm": false,
	"imageProfile": "https://www.omegascopio.com.br/wp-content/uploads/2022/09/Genshin-Impact-anime.jpg",
	"phone": "99 99999999",
	"email": "[email protected]",
	"name": "victor",
	"id": "9d531bf2-28b6-423f-a344-2d59b3bbd98a"
}

delete

status 204

sem corpo

Rota

todas precisam de autenticação do token

  /contact

create

body

{
	"name": "teste",
	"email": "[email protected]",
	"phone": "123456789"
}

status 201

{
	"id": "fb53c418-7fee-49f5-985b-a5e2c48d7b9c",
	"name": "teste",
	"email": "[email protected]",
	"phone": "123456789",
	"createdAt": "2023-03-27T18:37:23.966Z",
	"updatedAt": "2023-03-27T18:37:23.966Z"
}

get

status 200

[
	{
		"id": "9e289bf5-99b0-4661-98a1-0df5a253672e",
		"name": "lll",
		"email": "[email protected]",
		"phone": "4199999999",
		"createdAt": "2023-03-25T16:37:30.556Z",
		"updatedAt": "2023-03-28T21:03:48.853Z"
	}
]

delete e patch precisam do id do contato

  /contact/id

patch

body

"name":""
"email":""
"phone":""

status 200

{
	"id": "01094c39-0c0b-49e2-a8ed-26a0d24dd4d0",
	"name": "testel",
	"email": "[email protected]",
	"phone": "9999999999",
	"createdAt": "2023-03-23T21:56:22.172Z",
	"updatedAt": "2023-03-23T22:13:21.575Z"
}

delete n tem corpo

Stack utilizada Front-end: React, Styled Components e TypeScript

Back-end: Node, Express e PostgreSQL

contacts-back's People

Contributors

victor-novakoski avatar

Watchers

 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.