Commit b11efe33 authored by Jeremy Bokobza's avatar Jeremy Bokobza

Renamed info endpoint to general-info

parent 1759ddf9
...@@ -54,7 +54,7 @@ This error message comes at all request if the wallet is not loaded yet, except ...@@ -54,7 +54,7 @@ This error message comes at all request if the wallet is not loaded yet, except
## Key Management ## Key Management
``` ```
GET /wallet/general - Displays general information on the wallet GET /wallet/general-info - Displays general information on the wallet
GET /wallet/sensitive - Displays sensitive information on the wallet GET /wallet/sensitive - Displays sensitive information on the wallet
GET /wallet/status - Displays dynamic information on the wallet GET /wallet/status - Displays dynamic information on the wallet
POST /wallet/create - Creates the wallet POST /wallet/create - Creates the wallet
...@@ -86,7 +86,7 @@ POST /wallet/send-transaction - Attempts to send a transaction ...@@ -86,7 +86,7 @@ POST /wallet/send-transaction - Attempts to send a transaction
# Details # Details
## GET /wallet/general - Displays general information on the wallet ## GET /wallet/general-info - Displays general information on the wallet
### Responses ### Responses
``` ```
{ {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
"variables": [], "variables": [],
"info": { "info": {
"name": "Wallet", "name": "Wallet",
"_postman_id": "88e42ac6-4e01-8ec4-c109-12a07b8722de", "_postman_id": "25ac0bc5-23f5-e00d-932f-a8fde7787e7a",
"description": "Requests relating to operations on the wallet", "description": "Requests relating to operations on the wallet",
"schema": "https://schema.getpostman.com/json/collection/v2.0.0/collection.json" "schema": "https://schema.getpostman.com/json/collection/v2.0.0/collection.json"
}, },
...@@ -90,7 +90,7 @@ ...@@ -90,7 +90,7 @@
{ {
"name": "Get wallet Info", "name": "Get wallet Info",
"request": { "request": {
"url": "http://localhost:5000/api/v1/wallet/info?name=mywallet", "url": "http://localhost:5000/api/v1/wallet/general-info?name=mywallet",
"method": "GET", "method": "GET",
"header": [ "header": [
{ {
...@@ -199,7 +199,10 @@ ...@@ -199,7 +199,10 @@
"description": "" "description": ""
} }
], ],
"body": {}, "body": {
"mode": "raw",
"raw": ""
},
"description": "Gets all the wallets files stored in the default folder" "description": "Gets all the wallets files stored in the default folder"
}, },
"response": [] "response": []
......
...@@ -135,9 +135,9 @@ namespace Breeze.Wallet.Controllers ...@@ -135,9 +135,9 @@ namespace Breeze.Wallet.Controllers
/// </summary> /// </summary>
/// <param name="model">The name of the wallet.</param> /// <param name="model">The name of the wallet.</param>
/// <returns></returns> /// <returns></returns>
[Route("info")] [Route("general-info")]
[HttpGet] [HttpGet]
public IActionResult GetInfo([FromQuery] WalletName model) public IActionResult GetGeneralInfo([FromQuery] WalletName model)
{ {
// checks the request is valid // checks the request is valid
if (!this.ModelState.IsValid) if (!this.ModelState.IsValid)
...@@ -148,7 +148,7 @@ namespace Breeze.Wallet.Controllers ...@@ -148,7 +148,7 @@ namespace Breeze.Wallet.Controllers
try try
{ {
return this.Json(this.walletWrapper.GetInfo(model.Name)); return this.Json(this.walletWrapper.GetGeneralInfo(model.Name));
} }
catch (Exception e) catch (Exception e)
......
...@@ -6,10 +6,10 @@ using Newtonsoft.Json; ...@@ -6,10 +6,10 @@ using Newtonsoft.Json;
namespace Breeze.Wallet.Models namespace Breeze.Wallet.Models
{ {
public class WalletInfoModel public class WalletGeneralInfoModel
{ {
[JsonProperty(PropertyName = "filePath")] [JsonProperty(PropertyName = "walletFilePath")]
public string FilePath { get; set; } public string WalletFilePath { get; set; }
[JsonProperty(PropertyName = "encryptedSeed")] [JsonProperty(PropertyName = "encryptedSeed")]
public string EncryptedSeed { get; set; } public string EncryptedSeed { get; set; }
......
...@@ -17,7 +17,7 @@ namespace Breeze.Wallet.Wrappers ...@@ -17,7 +17,7 @@ namespace Breeze.Wallet.Wrappers
WalletModel Recover(string password, string folderPath, string name, string network, string mnemonic); WalletModel Recover(string password, string folderPath, string name, string network, string mnemonic);
WalletInfoModel GetInfo(string walletName); WalletGeneralInfoModel GetGeneralInfo(string walletName);
WalletBalanceModel GetBalance(string walletName); WalletBalanceModel GetBalance(string walletName);
......
...@@ -70,7 +70,7 @@ namespace Breeze.Wallet.Wrappers ...@@ -70,7 +70,7 @@ namespace Breeze.Wallet.Wrappers
}; };
} }
public WalletInfoModel GetInfo(string name) public WalletGeneralInfoModel GetGeneralInfo(string name)
{ {
throw new System.NotImplementedException(); throw new System.NotImplementedException();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment