implement currency and report
This commit is contained in:
36
transportmanager/server/routes/currency.py
Normal file
36
transportmanager/server/routes/currency.py
Normal file
@@ -0,0 +1,36 @@
|
||||
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
|
||||
Reference in New Issue
Block a user