Loading capif_backend/backoffice_service/core/operations.py +10 −10 Original line number Diff line number Diff line Loading @@ -255,6 +255,16 @@ class Operations: # Devolver un mensaje de error en caso de excepción return jsonify(message=f"Error deleting user: {str(e)}"), 500 def get_apis(self): mycol = self.db.get_col_by_name(self.db.services) apis = mycol.find({}, {"_id": 0}) json_apis = [] for api in apis: json_apis.append(api) return json_apis def get_num_apis(self): try: # Carga la cadena JSON de las APIs y conviértela a un objeto Python Loading @@ -266,13 +276,3 @@ class Operations: except Exception as e: # Devuelve una respuesta JSON con un mensaje de error return jsonify({"error": f"Error when retrieving number of APIs: {e}"}), 500 def get_apis1(self): mycol = self.db.get_col_by_name(self.db.services) apis = mycol.find({}, {"_id": 0}) json_apis = [] for api in apis: json_apis.append(api) return json_apis No newline at end of file Loading
capif_backend/backoffice_service/core/operations.py +10 −10 Original line number Diff line number Diff line Loading @@ -255,6 +255,16 @@ class Operations: # Devolver un mensaje de error en caso de excepción return jsonify(message=f"Error deleting user: {str(e)}"), 500 def get_apis(self): mycol = self.db.get_col_by_name(self.db.services) apis = mycol.find({}, {"_id": 0}) json_apis = [] for api in apis: json_apis.append(api) return json_apis def get_num_apis(self): try: # Carga la cadena JSON de las APIs y conviértela a un objeto Python Loading @@ -266,13 +276,3 @@ class Operations: except Exception as e: # Devuelve una respuesta JSON con un mensaje de error return jsonify({"error": f"Error when retrieving number of APIs: {e}"}), 500 def get_apis1(self): mycol = self.db.get_col_by_name(self.db.services) apis = mycol.find({}, {"_id": 0}) json_apis = [] for api in apis: json_apis.append(api) return json_apis No newline at end of file