Loading capif_backend/backoffice_service/controllers/default_controller.py +1 −1 Original line number Diff line number Diff line Loading @@ -121,7 +121,7 @@ def delete_user(username, password): @backoffice_routes.route("/apis", methods=["GET"]) @jwt_required() def get_apis(): return operations.get_apis() return operations.get_apis1() @backoffice_routes.route("/apis/num", methods=["GET"]) @jwt_required() Loading capif_backend/backoffice_service/core/operations.py +10 −0 Original line number Diff line number Diff line Loading @@ -307,3 +307,13 @@ 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/controllers/default_controller.py +1 −1 Original line number Diff line number Diff line Loading @@ -121,7 +121,7 @@ def delete_user(username, password): @backoffice_routes.route("/apis", methods=["GET"]) @jwt_required() def get_apis(): return operations.get_apis() return operations.get_apis1() @backoffice_routes.route("/apis/num", methods=["GET"]) @jwt_required() Loading
capif_backend/backoffice_service/core/operations.py +10 −0 Original line number Diff line number Diff line Loading @@ -307,3 +307,13 @@ 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