dbilayer_oracle/reqhandlers/dbpassword.py

91 lines
2.4 KiB
Python
Raw Permalink Normal View History

2023-05-15 18:06:03 +05:30
from flask import Blueprint, request, jsonify
from core.bll import bllengine
from flask_cors import cross_origin
from flask_jwt_extended import create_access_token, get_jwt, jwt_required
from reqhandlers.blocklist import BLOCKLIST
import datetime
from datetime import timedelta
dbpassword = Blueprint('dbpassword', __name__)
@dbpassword.route('/dbpassword/reqtest')
def retest():
return "success"
# 1.1. Create
@dbpassword.route('/dbpassword/create', methods=["POST"])
@cross_origin()
#@jwt_required()
#@cache.cached(timeout=50)
def createdbpassword():
req = request.json
resp = bllengine.dbpassword_processcreate(req)
return jsonify(resp)
# 1.2. Read One Conditional
@dbpassword.route('/dbpassword/readonecond', methods=["POST"])
@cross_origin()
#@jwt_required()
#@cache.cached(timeout=50)
def readOnedbpasswordwithCondition():
req = request.json
resp = bllengine.dbpassword_processreadonecond(req)
return jsonify(resp)
# 1.3. Read Multiple Conditional
@dbpassword.route('/dbpassword/readmanycond', methods=["POST"])
@cross_origin()
#@jwt_required()
#@cache.cached(timeout=50)
def reaManydbpasswordwithCond():
req = request.json
resp = bllengine.dbpassword_processreadmanycond(req)
return jsonify(resp)
# 1.4. Read All
@dbpassword.route('/dbpassword/readall', methods=["POST"])
@cross_origin()
#@jwt_required()
#@cache.cached(timeout=50)
def readManydbpasswordwithoutCond():
req = request.json
resp = bllengine.dbpassword_processreadmanywithoutcond(req)
return jsonify(resp)
# 1.5. Delete One Conditional
@dbpassword.route('/dbpassword/deleteonecond', methods=["POST"])
@cross_origin()
#@jwt_required()
#@cache.cached(timeout=50)
def deleteOnedbpasswordwithcondition():
req = request.json
resp = bllengine.dbpassword_processdeleteonecond(req)
return jsonify(resp)
# 1.6. Update One Conditional
@dbpassword.route('/dbpassword/updateonecond', methods=["POST"])
@cross_origin()
#@jwt_required()
#@cache.cached(timeout=50)
def updateonedbpasswordwithcondition():
req = request.json
resp = bllengine.dbpassword_processupdateonecond(req)
return jsonify(resp)
""""# 1.7. Update All
@dbpassword.route('/dbpassword/updateall', methods=["POST"])
@cross_origin()
#@jwt_required()
#@cache.cached(timeout=50)
def createdbpassword():
req = request.json
resp = bllengine.dbpassword_processupdateall(req)
return jsonify(resp)
"""