Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete observation API endpoint #8

Open
adriantpaez opened this issue Feb 25, 2019 · 0 comments
Open

Delete observation API endpoint #8

adriantpaez opened this issue Feb 25, 2019 · 0 comments

Comments

@adriantpaez
Copy link
Collaborator

Original issue: fibercrypto/skyxcommons#10 (comment)

[DELETE] /api/balances/{address}/observation

Should forget the wallet address and stop observing its balance.

Errors:
■ 204 No content - specified address is not observed

Python implementation

@api.route('/balances/<string:address>/observation', methods=['DELETE'])
def delete_observation(address):
    """
    Delete the specified address from observation list
    """

    result = delete_address_observation(address)

    # if successfully deleted from observation list, return a plain 200
    if "error" in result:
        return make_response(jsonify(build_error(result["error"])), result["status"])
    else:
        return ""
@adriantpaez adriantpaez self-assigned this Feb 25, 2019
@adriantpaez adriantpaez removed their assignment Nov 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant