From 8d778cff2c7cd364fa382e42b3eeb38e3e87ab3b Mon Sep 17 00:00:00 2001 From: William Luke Date: Wed, 8 Dec 2021 14:32:56 +0300 Subject: [PATCH] remove refill_gas and ping --- .../cic_eth/server/openapi/server.yaml | 22 +------------------ apps/cic-eth/cic_eth/server/routes.py | 16 ++++++-------- 2 files changed, 8 insertions(+), 30 deletions(-) diff --git a/apps/cic-eth/cic_eth/server/openapi/server.yaml b/apps/cic-eth/cic_eth/server/openapi/server.yaml index 80bb2984..bc0d564a 100644 --- a/apps/cic-eth/cic_eth/server/openapi/server.yaml +++ b/apps/cic-eth/cic_eth/server/openapi/server.yaml @@ -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: diff --git a/apps/cic-eth/cic_eth/server/routes.py b/apps/cic-eth/cic_eth/server/routes.py index b130f31f..da110294 100644 --- a/apps/cic-eth/cic_eth/server/routes.py +++ b/apps/cic-eth/cic_eth/server/routes.py @@ -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,