remove refill_gas and ping

This commit is contained in:
William Luke 2021-12-08 14:32:56 +03:00
parent 535deb9974
commit 8d778cff2c
2 changed files with 8 additions and 30 deletions

View File

@ -9,7 +9,7 @@ info:
email: will@grassecon.org
license:
name: GPLv3
version: 0.1.0
version: 0.0.1
servers:
- url: /
paths:
@ -81,26 +81,6 @@ paths:
application/json:
schema:
$ref: "#/components/schemas/Token"
/refill_gas:
post:
tags:
- Account
description: Creates a new gas refill transaction with the registered gas provider address.
operationId: post_refill_gas
parameters:
- name: address
in: query
required: true
schema:
type: string
example: "0xe88ba386f0efc7117e8d0d17a750fce492516ecb"
responses:
"200":
description: OK.
content:
application/json:
schema:
$ref: "#/components/schemas/Token"
/default_token:
get:
tags:

View File

@ -45,15 +45,15 @@ def handle_create_account(start_response, query: dict) -> List[bytes]:
return uwsgi.respond(start_response, data)
def handle_refill_gas(start_response, query: dict) -> List[bytes]:
address = query.pop('address')
data = celery.call('refill_gas', address)
return uwsgi.respond(start_response, data)
# def handle_refill_gas(start_response, query: dict) -> List[bytes]:
# address = query.pop('address')
# data = celery.call('refill_gas', address)
# return uwsgi.respond(start_response, data)
def handle_ping(start_response, query: dict) -> List[bytes]:
data = celery.call('ping', **query)
return uwsgi.respond(start_response, data)
# def handle_ping(start_response, query: dict) -> List[bytes]:
# data = celery.call('ping', **query)
# return uwsgi.respond(start_response, data)
def handle_transfer(start_response, query: dict) -> List[bytes]:
@ -121,8 +121,6 @@ routes: Dict[str, Callable[[Any, Union[None, dict]], List[bytes]]] = {
"/transactions": handle_transactions,
"/balance": handle_balance,
"/create_account": handle_create_account,
"/refill_gas": handle_refill_gas,
"/ping": handle_ping,
"/transfer": handle_transfer,
"/transfer_from": handle_transfer_from,
"/token": handle_token,