From 204932d095ca48e1a1b50bd7a4de8ae1de1c0dc9 Mon Sep 17 00:00:00 2001
From: Matheus Silva Vicente <100722308+Matheusvic112@users.noreply.github.com>
Date: Wed, 29 Mar 2023 21:26:55 -0300
Subject: [PATCH 1/2] Update README.md
---
README.md | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/README.md b/README.md
index 8313e27..248ee87 100644
--- a/README.md
+++ b/README.md
@@ -1,12 +1,10 @@
- CliCont API | API REST (Back-end)
Este é o backend da aplicação WebAgenda API para gerenciamento de clientes e contatos.
-A API está disponível em https://api-clie-cont.onrender.com
Clientes (Endpoints)
@@ -297,4 +295,4 @@ Caso dê tudo certo, a resposta será assim:
{
"message": "Contact Not Found"
}
-```
\ No newline at end of file
+```
From 410b166e3e19c2f41088839c0a866f2dd20db805 Mon Sep 17 00:00:00 2001
From: Matheus Silva Vicente <100722308+Matheusvic112@users.noreply.github.com>
Date: Wed, 29 Mar 2023 21:30:55 -0300
Subject: [PATCH 2/2] Delete README.md
---
README.md | 298 ------------------------------------------------------
1 file changed, 298 deletions(-)
delete mode 100644 README.md
diff --git a/README.md b/README.md
deleted file mode 100644
index 248ee87..0000000
--- a/README.md
+++ /dev/null
@@ -1,298 +0,0 @@
-
-
-
-
-Este é o backend da aplicação WebAgenda API para gerenciamento de clientes e contatos.
-
-
-
-Clientes (Endpoints)
-
-## **Rotas Sem Autenticação**
-
-Criação de um Cliente:
-
-
-
-Observação: O campo "phone" precisa ter 11 digitos
-
-`POST /clients - FORMATO DA REQUISIÇÃO - STATUS 201`
-
-```json
-{
- "nome_completo": "Msqs Silva",
- "email": "testes@mail.com",
- "telefone": "11 9832915597",
-}
-```
-
-Caso dê tudo certo, a resposta será assim:
-
-`POST /client - FORMATO DA RESPOSTA - STATUS 201`
-
-```json
-{
- "id": "711a43eb-d36a-4f70-81d4-9245d688fab7",
- "nome_completo": "Msqs Silva",
- "email": "testes@mail.com",
- "telefone": "11 9832915597",
- "createdAt": "2023-03-24T01:51:28.923Z",
- "contatos": []
-},
-
-```
-
-
-
-Login do Cliente
-
-
-
-`POST /client/login - FORMATO DA REQUISIÇÃO - STATUS 201`
-
-```json
-{
- "email": "testes@mail.com",
- "password": "1234567"
-}
-```
-
-Caso dê tudo certo, a resposta será assim:
-
-`POST /client/login - FORMATO DA RESPOSTA - STATUS 201`
-
-```json
-{
- "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjcxMWE0M2ViLWQzNmEtNGY3MC04MWQ0LTkyNDVkNjg4ZmFiNyIsImlhdCI6MTY4MDEyOTAwNSwiZXhwIjoxNjgwMjE1NDA1LCJzdWIiOiI3MTFhNDNlYi1kMzZhLTRmNzAtODFkNC05MjQ1ZDY4OGZhYjcifQ.pu5TsJwCRwaFLqsrcsVdbBw0529OQBcd6aKr2-qBgdM"
-}
-```
-
-Caso dê um erro irá retornar o seguinte erro:
-
-```json
-{
- "message": "wrong email"
-
-}
-
-{
- "message": "wrong password"
-}
-```
-
-## **Rotas Com Autenticação**
-
-Rotas que necessitam de autorização deve ser informado no cabeçalho da requisição o campo "Authorization", dessa forma:
-
-> Authorization: Bearer {token}
-
-
-> Caso você tente acessar os endpoints sem um token válido receberá o seguinte erro
-
-
-
-`(Exemplo) POST /contact/ - 401 Sem Autorização`
-
-```json
-{
- "message": "Invalid token"
-}
-```
-
-
-
-> Caso seja informado um id inválido ou diferente do id do usuário logado irá retornar:
-
-```json
-{
- "message": "Token required"
-}
-```
-
-##
-
-Podemos acessar um cliente específico utilizando o endpoint:
-
-
-
-`GET /client/:id - FORMATO DA RESPOSTA - STATUS 200`
-
-```json
- {
- "id": "711a43eb-d36a-4f70-81d4-9245d688fab7",
- "nome_completo": "Msqs Silva",
- "email": "testes@mail.com",
- "telefone": "11 9832915597",
- "createdAt": "2023-03-24T01:51:28.923Z",
- "contatos": []
- },
-```
-
-Atualização de um cliente
-
-
-
-`PATCH /client/:id - FORMATO DA REQUISIÇÃO`
-
-```json
-{
- "email": "teste13@gmail.com"
-}
-```
-
-Caso dê tudo certo, a resposta será assim:
-
-`PATCH /client/:id - FORMATO DA RESPOSTA - STATUS 200`
-
-```json
-{
- "nome_completo": "Msqs Silva",
- "email": "testes13@mail.com",
- "telefone": "11 9832915597",
-
-}
-```
-
-Podemos deletar um cliente específico utilizando o endpoint:
-
-
-
-`DELETE /client/:client_id - FORMATO DA RESPOSTA - STATUS 204`
-
-```json
-{}
-```
-
-
-
-Outra Possível Mensagem de Erro:
-
-
-
-```json
-{
- "message": "Client Not Found"
-}
-```
-
-Contatos (Endpoints)
-
-Criando um contato a partir do cliente logado:
-
-
-
-`POST /contacts - FORMATO DA REQUISIÇÃO`
-
-```json
-{
- "nome_completo": "teste Silva",
- "email": "testandoSilva@mail.com",
- "telefone": "11 983191199"
-}
-```
-
-Caso dê tudo certo, a resposta será assim:
-
-`POST /contacts - FORMATO DA RESPOSTA - STATUS 201`
-
-```json
-
-{
- "id": "e4e3b1a3-5e77-464c-8879-bb666b9164c6",
- "nome_completo": "teste Silva",
- "email": "testandoSilva@mail.com",
- "telefone": "11 9831915197",
- "createdAt": "2023-03-29T22:35:01.883Z",
- "updatedAt": "2023-03-29T22:35:01.883Z",
- "cliente": {
- "id": "711a43eb-d36a-4f70-81d4-9245d688fab7",
- "nome_completo": "Msqs Silva",
- "email": "testes@mail.com",
- "telefone": "11 9832915597",
- "createdAt": "2023-03-24T01:51:28.923Z",
- "updatedAt": "2023-03-29T22:34:09.952Z"
- }
-},
-
-
-```
-
-Acessando um contato
-
-
-
-`GET /contacts/:id - FORMATO DA RESPOSTA - STATUS 200`
-
-```json
-{
- {
- "id": "e4e3b1a3-5e77-464c-8879-bb666b9164c6",
- "nome_completo": "teste Silva",
- "email": "testandoSilva@mail.com",
- "telefone": "11 9831915197",
- "createdAt": "2023-03-29T22:35:01.883Z",
- "updatedAt": "2023-03-29T22:35:01.883Z"
-
- }
-}
-```
-
-Atualização de um cliente
-
-
-
-`PATCH /contacts/:id - FORMATO DA REQUISIÇÃO`
-
-```json
-{
- "nome_completo":"testes Silva",
- "email":"teste33@mail.com",
- "telefone":"11 9831915197"
-
-}
-```
-
-Caso dê tudo certo, a resposta será assim:
-
-`PATCH /contacts/:id - FORMATO DA RESPOSTA - STATUS 200`
-
-```json
-{
- "id": "a4637f1e-20c8-4b7d-bb5f-53f6a61d14ed",
- "nome_completo": "testes Silva",
- "email": "teste33@mail.com",
- "telefone": "11 9831915197",
- "createdAt": "2023-03-28T03:54:13.856Z",
- "updatedAt": "2023-03-28T03:54:13.856Z",
- "cliente": {
- "id": "711a43eb-d36a-4f70-81d4-9245d688fab7",
- "nome_completo": "Msqs Silva",
- "email": "testes@mail.com",
- "telefone": "11 9832915597",
- "createdAt": "2023-03-24T01:51:28.923Z",
- "updatedAt": "2023-03-29T22:34:09.952Z"
- }
-}
-```
-
-Podemos deletar um contato específico utilizando o endpoint:
-
-
-
-`DELETE /contacts/:contact_id - FORMATO DA RESPOSTA - STATUS 204`
-
-```json
-{}
-```
-
-
-
-Outra Possível Mensagem de Erro:
-
-
-
-```json
-{
- "message": "Contact Not Found"
-}
-```