13 lines
347 B
Python
13 lines
347 B
Python
from flask import jsonify
|
|
from .base import BaseView
|
|
from api.errors import Messages
|
|
|
|
|
|
class TickerView(BaseView):
|
|
def get(self):
|
|
try:
|
|
data = self.service.get_tickers()
|
|
return jsonify({"data": data}), 200
|
|
except Exception as e:
|
|
return jsonify({"error": Messages.INTERNAL_SERVER_ERROR}), 500
|