Example #1
0
def saveuserinfo():
    try:
        return Users.add_userinfo()
    except Exception as e:
        raise InvalidUsage(str(e), status_code=500)
Example #2
0
def updateuserinfo(authid):
    try:
        return Users.update_userinfo(authid)
    except Exception as e:
        raise InvalidUsage(str(e), status_code=500)
Example #3
0
def removeuser(authid):
    try:
        return Auths.delete_account(authid)
    except Exception as e:
        raise InvalidUsage(str(e), status_code=500)
Example #4
0
def getallusers():
    try:
        return Users.get_all_users()
    except Exception as e:
        raise InvalidUsage(str(e), status_code=500)
Example #5
0
def getuserby(value):
    try:
        return Users.get_user_by(value)
    except Exception as e:
        raise InvalidUsage(str(e), status_code=500)
Example #6
0
def register():
    try:
        return Auths.register()
    except Exception as e:
        raise InvalidUsage(str(e), status_code=500)
Example #7
0
def confirm(token):
    try:
        return Auths.confirms(token)
    except Exception as e:
        raise InvalidUsage(str(e), status_code=500)
def get_file(path, filename):
    try:
        return send_from_directory(app.config['UPLOAD_FOLDER'] + '/' + path,
                                   filename)
    except Exception as e:
        raise InvalidUsage(str(e), status_code=500)
Example #9
0
def login():
    try:
        return Auths.login()
    except Exception as e:
        raise InvalidUsage(str(e), status_code=500)
def upload_file(path):
    try:
        return Files.uploadProfileImage(path)
    except Exception as e:
        raise InvalidUsage(str(e), status_code=500)
def get_folder(path):
    try:
        return Files.getAllFiles(path)
    except Exception as e:
        raise InvalidUsage(str(e), status_code=500)
Example #12
0
def getallSubscribersRoute():
    try:
        return Newsletter.getAllSubscribers()
    except Exception as e:
        raise InvalidUsage(str(e), status_code=500)
Example #13
0
def unsubscribeProvider(value):
    try:
        return Newsletter.unsubscribe(value)
    except Exception as e:
        raise InvalidUsage(str(e), status_code=500)
Example #14
0
def addSubscriber():
    try:
        return Newsletter.subscribe_user()
    except Exception as e:
        raise InvalidUsage(str(e), status_code=500)