You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

14 lines
568 B

from utils.apiDoc import *
@authority.route('/director')
class AuthorityDirector(Resource):
@staticmethod
def get():
user_name = verify_jwt_username(request.headers.get('X-Token'))
director = db.session.query(DictUser.UserName).join(DictCommon, DictUser.RightCode == DictCommon.ItemCode).\
filter(DictCommon.ItemName == '主任').first()
if director.UserName == user_name:
return SuccessResponse(ResultCode.SUCCESS, True, None)
else:
return SuccessResponse(ResultCode.SUCCESS, False, None)