Merge branch 'features1.4/user' into develop-1.4
This commit is contained in:
commit
16dd8584db
|
@ -1,387 +0,0 @@
|
|||
{
|
||||
"info": {
|
||||
"_postman_id": "6f868823-1ce1-4139-ba21-60eca129d008",
|
||||
"name": "JAVA-API",
|
||||
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
|
||||
},
|
||||
"item": [
|
||||
{
|
||||
"name": "Transaction",
|
||||
"item": [
|
||||
{
|
||||
"name": "getTransaction",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [],
|
||||
"body": {
|
||||
"mode": "raw",
|
||||
"raw": ""
|
||||
},
|
||||
"url": {
|
||||
"raw": "http://localhost:8083/api/rest/transaction/get?userHash=$2a$10$tEogSW32MJQGqt1qO8MZB.rONrEDjKD9u8szelMpZSAUzlt7rEYOG&transactionHash=TESTGFJDOOJI3285941981FDSDSFSSDGxxdsfz",
|
||||
"protocol": "http",
|
||||
"host": [
|
||||
"localhost"
|
||||
],
|
||||
"port": "8083",
|
||||
"path": [
|
||||
"api",
|
||||
"rest",
|
||||
"transaction",
|
||||
"get"
|
||||
],
|
||||
"query": [
|
||||
{
|
||||
"key": "userHash",
|
||||
"value": "$2a$10$tEogSW32MJQGqt1qO8MZB.rONrEDjKD9u8szelMpZSAUzlt7rEYOG"
|
||||
},
|
||||
{
|
||||
"key": "transactionHash",
|
||||
"value": "TESTGFJDOOJI3285941981FDSDSFSSDGxxdsfz"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"response": []
|
||||
},
|
||||
{
|
||||
"name": "getLatestTransaction",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [],
|
||||
"body": {
|
||||
"mode": "raw",
|
||||
"raw": ""
|
||||
},
|
||||
"url": {
|
||||
"raw": "http://localhost:8083/api/rest/transaction/getLatest?userHash=$2a$10$tEogSW32MJQGqt1qO8MZB.rONrEDjKD9u8szelMpZSAUzlt7rEYOG",
|
||||
"protocol": "http",
|
||||
"host": [
|
||||
"localhost"
|
||||
],
|
||||
"port": "8083",
|
||||
"path": [
|
||||
"api",
|
||||
"rest",
|
||||
"transaction",
|
||||
"getLatest"
|
||||
],
|
||||
"query": [
|
||||
{
|
||||
"key": "userHash",
|
||||
"value": "$2a$10$tEogSW32MJQGqt1qO8MZB.rONrEDjKD9u8szelMpZSAUzlt7rEYOG"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"response": []
|
||||
},
|
||||
{
|
||||
"name": "getAllTransaction",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [],
|
||||
"body": {
|
||||
"mode": "raw",
|
||||
"raw": ""
|
||||
},
|
||||
"url": {
|
||||
"raw": "http://localhost:8083/api/rest/transaction/getAll?userHash=$2a$10$tEogSW32MJQGqt1qO8MZB.rONrEDjKD9u8szelMpZSAUzlt7rEYOG",
|
||||
"protocol": "http",
|
||||
"host": [
|
||||
"localhost"
|
||||
],
|
||||
"port": "8083",
|
||||
"path": [
|
||||
"api",
|
||||
"rest",
|
||||
"transaction",
|
||||
"getAll"
|
||||
],
|
||||
"query": [
|
||||
{
|
||||
"key": "userHash",
|
||||
"value": "$2a$10$tEogSW32MJQGqt1qO8MZB.rONrEDjKD9u8szelMpZSAUzlt7rEYOG"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"response": []
|
||||
},
|
||||
{
|
||||
"name": "saveTransaction",
|
||||
"request": {
|
||||
"method": "POST",
|
||||
"header": [
|
||||
{
|
||||
"key": "Content-Type",
|
||||
"name": "Content-Type",
|
||||
"value": "application/json",
|
||||
"type": "text"
|
||||
}
|
||||
],
|
||||
"body": {
|
||||
"mode": "raw",
|
||||
"raw": "{\r\n\t\"transactionFrom\":\"$2a$10$jviPGl4mc1nGOp4hZUyOmeFqFWlQB7mvFToWPGUiq8W5Z1LZP3e4C\",\r\n\t\"transactionTo\":\"$2a$10$tEogSW32MJQGqt1qO8MZB.rONrEDjKD9u8szelMpZSAUzlt7rEYOG\",\r\n\t\"transactionHash\":\"TESTGFJDOOJI3285941981FDSDSFSSDGxxdsfz\",\r\n\t\"transactionAmount\":1.50,\r\n\t\"transactionUnit\":\"Gonettes\"\r\n}"
|
||||
},
|
||||
"url": {
|
||||
"raw": "http://localhost:8083/api/rest/transaction/save",
|
||||
"protocol": "http",
|
||||
"host": [
|
||||
"localhost"
|
||||
],
|
||||
"port": "8083",
|
||||
"path": [
|
||||
"api",
|
||||
"rest",
|
||||
"transaction",
|
||||
"save"
|
||||
]
|
||||
}
|
||||
},
|
||||
"response": []
|
||||
},
|
||||
{
|
||||
"name": "sentTransactions",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [],
|
||||
"body": {
|
||||
"mode": "raw",
|
||||
"raw": ""
|
||||
},
|
||||
"url": {
|
||||
"raw": "http://localhost:8083/api/rest/transaction/sent?userHash=$2a$10$tEogSW32MJQGqt1qO8MZB.rONrEDjKD9u8szelMpZSAUzlt7rEYOG",
|
||||
"protocol": "http",
|
||||
"host": [
|
||||
"localhost"
|
||||
],
|
||||
"port": "8083",
|
||||
"path": [
|
||||
"api",
|
||||
"rest",
|
||||
"transaction",
|
||||
"sent"
|
||||
],
|
||||
"query": [
|
||||
{
|
||||
"key": "userHash",
|
||||
"value": "$2a$10$tEogSW32MJQGqt1qO8MZB.rONrEDjKD9u8szelMpZSAUzlt7rEYOG"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"response": []
|
||||
},
|
||||
{
|
||||
"name": "receivedTransaction",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [],
|
||||
"body": {
|
||||
"mode": "raw",
|
||||
"raw": ""
|
||||
},
|
||||
"url": {
|
||||
"raw": "http://localhost:8083/api/rest/transaction/received?userHash=$2a$10$tEogSW32MJQGqt1qO8MZB.rONrEDjKD9u8szelMpZSAUzlt7rEYOG",
|
||||
"protocol": "http",
|
||||
"host": [
|
||||
"localhost"
|
||||
],
|
||||
"port": "8083",
|
||||
"path": [
|
||||
"api",
|
||||
"rest",
|
||||
"transaction",
|
||||
"received"
|
||||
],
|
||||
"query": [
|
||||
{
|
||||
"key": "userHash",
|
||||
"value": "$2a$10$tEogSW32MJQGqt1qO8MZB.rONrEDjKD9u8szelMpZSAUzlt7rEYOG"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"response": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Server",
|
||||
"item": [
|
||||
{
|
||||
"name": "get sent transactions",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [],
|
||||
"body": {
|
||||
"mode": "raw",
|
||||
"raw": ""
|
||||
},
|
||||
"url": {
|
||||
"raw": "http://37.187.101.44:10053/api/rest/transaction/sent?userHash=$2a$10$tEogSW32MJQGqt1qO8MZB.rONrEDjKD9u8szelMpZSAUzlt7rEYOG",
|
||||
"protocol": "http",
|
||||
"host": [
|
||||
"37",
|
||||
"187",
|
||||
"101",
|
||||
"44"
|
||||
],
|
||||
"port": "10053",
|
||||
"path": [
|
||||
"api",
|
||||
"rest",
|
||||
"transaction",
|
||||
"sent"
|
||||
],
|
||||
"query": [
|
||||
{
|
||||
"key": "userHash",
|
||||
"value": "$2a$10$tEogSW32MJQGqt1qO8MZB.rONrEDjKD9u8szelMpZSAUzlt7rEYOG"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"response": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "FirstTest",
|
||||
"item": [
|
||||
{
|
||||
"name": "getBalance",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [],
|
||||
"body": {
|
||||
"mode": "raw",
|
||||
"raw": ""
|
||||
},
|
||||
"url": {
|
||||
"raw": "http://localhost:10053/api/rest/query/balance?userHash=$2a$10$tEogSW32MJQGqt1qO8MZB.rONrEDjKD9u8szelMpZSAUzlt7rEYOG",
|
||||
"protocol": "http",
|
||||
"host": [
|
||||
"localhost"
|
||||
],
|
||||
"port": "10053",
|
||||
"path": [
|
||||
"api",
|
||||
"rest",
|
||||
"query",
|
||||
"balance"
|
||||
],
|
||||
"query": [
|
||||
{
|
||||
"key": "userHash",
|
||||
"value": "$2a$10$tEogSW32MJQGqt1qO8MZB.rONrEDjKD9u8szelMpZSAUzlt7rEYOG"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"response": []
|
||||
},
|
||||
{
|
||||
"name": "Login",
|
||||
"request": {
|
||||
"method": "POST",
|
||||
"header": [
|
||||
{
|
||||
"key": "Content-Type",
|
||||
"name": "Content-Type",
|
||||
"value": "application/json",
|
||||
"type": "text"
|
||||
}
|
||||
],
|
||||
"body": {
|
||||
"mode": "raw",
|
||||
"raw": "{\n\t\"email\":\"thomas.marshal@gmal.com\",\n\t\"password\":\"newPassword\"\n}"
|
||||
},
|
||||
"url": {
|
||||
"raw": "http://localhost:10053/api/rest/user/login",
|
||||
"protocol": "http",
|
||||
"host": [
|
||||
"localhost"
|
||||
],
|
||||
"port": "10053",
|
||||
"path": [
|
||||
"api",
|
||||
"rest",
|
||||
"user",
|
||||
"login"
|
||||
]
|
||||
}
|
||||
},
|
||||
"response": []
|
||||
},
|
||||
{
|
||||
"name": "Register",
|
||||
"request": {
|
||||
"method": "POST",
|
||||
"header": [
|
||||
{
|
||||
"key": "Content-Type",
|
||||
"name": "Content-Type",
|
||||
"value": "application/json",
|
||||
"type": "text"
|
||||
}
|
||||
],
|
||||
"body": {
|
||||
"mode": "raw",
|
||||
"raw": "{\n\t\"name\":\"Clara\",\n\t\"firstname\":\"Sophie\",\n\t\"email\":\"sophie.clara@gmail.com\",\n\t\"password\":\"sophieClara\"\n}"
|
||||
},
|
||||
"url": {
|
||||
"raw": "http://localhost:8083/api/rest/user/save",
|
||||
"protocol": "http",
|
||||
"host": [
|
||||
"localhost"
|
||||
],
|
||||
"port": "8083",
|
||||
"path": [
|
||||
"api",
|
||||
"rest",
|
||||
"user",
|
||||
"save"
|
||||
]
|
||||
}
|
||||
},
|
||||
"response": []
|
||||
},
|
||||
{
|
||||
"name": "getUser",
|
||||
"request": {
|
||||
"method": "POST",
|
||||
"header": [
|
||||
{
|
||||
"key": "Content-Type",
|
||||
"name": "Content-Type",
|
||||
"value": "application/json",
|
||||
"type": "text"
|
||||
}
|
||||
],
|
||||
"body": {
|
||||
"mode": "raw",
|
||||
"raw": "{\n\t\"email\":\"thomas.marshal@gmail.com\",\n\t\"password\":\"newPassword\"\n}"
|
||||
},
|
||||
"url": {
|
||||
"raw": "http://localhost:8083/api/rest/user/get",
|
||||
"protocol": "http",
|
||||
"host": [
|
||||
"localhost"
|
||||
],
|
||||
"port": "8083",
|
||||
"path": [
|
||||
"api",
|
||||
"rest",
|
||||
"user",
|
||||
"get"
|
||||
]
|
||||
}
|
||||
},
|
||||
"response": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
|
@ -110,7 +110,7 @@ public class UserResource {
|
|||
userResponse.setUserId(response.getUserId());
|
||||
return ResponseEntity.status(HttpStatus.OK).body(userResponse);
|
||||
}else{
|
||||
return new ResponseEntity("Error", HttpStatus.NOT_FOUND);
|
||||
return new ResponseEntity("{\"response\":\"error\"}", HttpStatus.NOT_FOUND);
|
||||
}
|
||||
}catch (Exception e){
|
||||
return new ResponseEntity(e.getMessage(), HttpStatus.INTERNAL_SERVER_ERROR);
|
||||
|
|
Loading…
Reference in a new issue