diff --git a/server/backend/app/classes/octi.py b/server/backend/app/classes/octi.py index 2db4aad..2450644 100644 --- a/server/backend/app/classes/octi.py +++ b/server/backend/app/classes/octi.py @@ -56,8 +56,8 @@ class OCTI(object): Delete a OpenCTI instance by its id in the database. :return: status of the operation in JSON """ - if db.session.query(exists().where(OCTIInst.id == misp_id)).scalar(): - db.session.query(OCTIInst).filter_by(id=misp_id).delete() + if db.session.query(exists().where(OCTIInst.id == opencti_id)).scalar(): + db.session.query(OCTIInst).filter_by(id=opencti_id).delete() db.session.commit() return {"status": True, "message": "OpenCTI instance deleted"} diff --git a/server/backend/main.py b/server/backend/main.py index 4f6bf07..24968f8 100644 --- a/server/backend/main.py +++ b/server/backend/main.py @@ -59,7 +59,7 @@ app.register_blueprint(ioc_bp, url_prefix='/api/ioc') app.register_blueprint(whitelist_bp, url_prefix='/api/whitelist') app.register_blueprint(config_bp, url_prefix='/api/config') app.register_blueprint(misp_bp, url_prefix='/api/misp') -app.register_blueprint(octi_bp, url_prefix='/api/octi') +app.register_blueprint(octi_bp, url_prefix='/api/opencti') if __name__ == '__main__': ssl_cert = "{}/{}".format(path[0], 'cert.pem')