Open edmarques11 opened 2 years ago
POST /admin/auth
Payload:
{ "email": "leaf.reciclagem@reci.leaf.com", "password": "Lea@fadm1n" }
Response:
{ "code": 201, "data": { "auth": true, "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MSwiaXNfYWRtaW4iOnRydWUsImlhdCI6MTY0MzY3MTQyNywiZXhwIjoxNjQzNzE0NjI3fQ.PUzCa8r4UwiqVKrJXapRm42vyRVPK0owfz8zrlDaJ7s", "entite": { "name": "Admin", "email": "leaf.reciclagem@reci.leaf.com" } }, "message": "Sucesso!" }
POST /wallet
Payload: sem payload Response:
{ "code": 201, "data": { "id": 1, "wallet_code": "f5c1f232-0ca2-42c4-901e-2f5349ebecc1", "updatedAt": "2022-01-31T23:25:15.073Z", "createdAt": "2022-01-31T23:25:15.073Z" }, "message": "Sucesso!" }
POST /file-upload
Payload: Arquivo de imagem jpg, jpeg, png, gif Response:
{ "code": 201, "data": { "urlFile": "https://storage.googleapis.com/stock-academic-7e9cc.appspot.com/6e8566cd-5282-49d6-bbd7-9ce44304ea7b-download.jpeg" }, "message": "Upload concluído com sucesso!" }
DELETE /file-exclude/{pathFile}
Payload: Sem payload Response:
{ "code": 200, "data": {}, "message": "sucesso" }
POST /users
payload:
{ "name": "Edmarques", "nickname": "edm", "phone": "(12) 91234-5678", "type_key_pix": "celular", "key_pix: "(12) 91234-5678", "cpf_or_cnpj": "123.456.789-10", "password": "password", "email": "edmarques@leaf.com", "wallet_id": 1, "is_admin": false }
{ "code": 201, "data": { "id": 3, "name": "Edmarques", "nickname": "edm", "phone": "(12) 91234-5678", "email": "edmarques@leaf.com", "type_key_pix": "celular", "key_pix": "(12) 91234-5678", "cpf_or_cnpj": "123.456.789-10", "wallet_id": 1, "is_admin": false, "updatedAt": "2022-01-30T03:42:31.157Z", "createdAt": "2022-01-30T03:42:31.157Z", "user_photo": "https://storage.googleapis.com/stock-academic-7e9cc.appspot.com/6e8566cd-5282-49d6-bbd7-9ce44304ea7b-download.jpeg" }, "message": "Sucesso!" }
PATCH /users/{userId}
GET /users
Payload: sem payload, Response:
{ "code": 200, "data": [ { "id": 3, "name": "Edmarques", "email": "edmarques@leaf.com", "phone": null, "wallet": { "id": 1, "wallet_code": "95ad7ed2-5874-4809-abfc-9f85b2e48ebb" } } ], "message": "Sucesso!" }
Correção de formatação do json
Login admin
Payload:
Response:
Criar nova wallet:
Payload: sem payload Response:
Upload de Foto de Usuário:
Payload: Arquivo de imagem jpg, jpeg, png, gif Response:
Deletar foto upada:
Payload: Sem payload Response:
Salvar usuário
payload:
Response:
Atualizar dado de usuário:
Payload:
Response:
Buscar todos os usuários
Payload: sem payload, Response: