def registerdevice(): if request.method == 'GET': return Codes.invalidrequest() if request.method == 'POST': return db.registerDevice(request.get_json())
def addmoney(): if request.method == 'GET': return Codes.invalidrequest() if request.method == 'POST': return db.addMoney(request.get_json())
def getdevicedata(): if request.method == 'GET': return Codes.invalidrequest() if request.method == 'POST': return db.getDeviceData(request.get_json())
def login(): if request.method == 'GET': return Codes.invalidrequest() if request.method == 'POST': return db.loginuser(request.get_json())