36 lines
774 B
Python
36 lines
774 B
Python
from flask import Blueprint, request, jsonify
|
|
from models.currency import Currency
|
|
from models.user import Users
|
|
|
|
from flask_jwt_extended import jwt_required, get_jwt_identity
|
|
|
|
currency_bp = Blueprint("currency", __name__, url_prefix="/currency")
|
|
|
|
@currency_bp.route("/", methods=["GET"])
|
|
@jwt_required()
|
|
def list_currency():
|
|
#currency = Currency()
|
|
currency = [
|
|
{
|
|
'id':1,
|
|
'name':'USD',
|
|
'value':'',
|
|
},
|
|
{
|
|
'id':2,
|
|
'name':'EURO',
|
|
'value':'',
|
|
},
|
|
{
|
|
'id':3,
|
|
'name':'CHF',
|
|
'value':'',
|
|
},
|
|
{
|
|
'id':4,
|
|
'name':'GBP',
|
|
'value':'',
|
|
}
|
|
]
|
|
|
|
return jsonify(currency), 200 |