forked from Qortal/qortal
Persist MintingAccounts.json on minting accounts add/remove
this fix the behavior of the node, After adding or removing a minting account, allowing it to persist it to the backup folder
This commit is contained in:
parent
e07adbd60e
commit
6b83927048
@ -315,6 +315,7 @@ public class AdminResource {
|
|||||||
|
|
||||||
repository.getAccountRepository().save(mintingAccountData);
|
repository.getAccountRepository().save(mintingAccountData);
|
||||||
repository.saveChanges();
|
repository.saveChanges();
|
||||||
|
repository.exportNodeLocalData();//after adding new minting account let's persist it to the backup MintingAccounts.json
|
||||||
} catch (IllegalArgumentException e) {
|
} catch (IllegalArgumentException e) {
|
||||||
throw ApiExceptionFactory.INSTANCE.createException(request, ApiError.INVALID_PRIVATE_KEY, e);
|
throw ApiExceptionFactory.INSTANCE.createException(request, ApiError.INVALID_PRIVATE_KEY, e);
|
||||||
} catch (DataException e) {
|
} catch (DataException e) {
|
||||||
@ -355,6 +356,7 @@ public class AdminResource {
|
|||||||
return "false";
|
return "false";
|
||||||
|
|
||||||
repository.saveChanges();
|
repository.saveChanges();
|
||||||
|
repository.exportNodeLocalData();//after removing new minting account let's persist it to the backup MintingAccounts.json
|
||||||
} catch (IllegalArgumentException e) {
|
} catch (IllegalArgumentException e) {
|
||||||
throw ApiExceptionFactory.INSTANCE.createException(request, ApiError.INVALID_PRIVATE_KEY, e);
|
throw ApiExceptionFactory.INSTANCE.createException(request, ApiError.INVALID_PRIVATE_KEY, e);
|
||||||
} catch (DataException e) {
|
} catch (DataException e) {
|
||||||
@ -546,7 +548,7 @@ public class AdminResource {
|
|||||||
@Path("/repository/data")
|
@Path("/repository/data")
|
||||||
@Operation(
|
@Operation(
|
||||||
summary = "Export sensitive/node-local data from repository.",
|
summary = "Export sensitive/node-local data from repository.",
|
||||||
description = "Exports data to .script files on local machine"
|
description = "Exports data to .json files on local machine"
|
||||||
)
|
)
|
||||||
@ApiErrors({ApiError.INVALID_DATA, ApiError.REPOSITORY_ISSUE})
|
@ApiErrors({ApiError.INVALID_DATA, ApiError.REPOSITORY_ISSUE})
|
||||||
@SecurityRequirement(name = "apiKey")
|
@SecurityRequirement(name = "apiKey")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user