MCPcopy
hub / github.com/lektor/lektor / get_servers

Function get_servers

lektor/admin/modules/api.py:315–323  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

313
314@bp.route("/servers")
315def get_servers():
316 db = g.admin_context.pad.db
317 config = db.env.load_config()
318 servers = config.get_servers(public=True)
319 return jsonify(
320 servers=sorted(
321 [x.to_json() for x in servers.values()], key=lambda x: x["name"].lower()
322 )
323 )
324
325
326@bp.route("/build", methods=["POST"])

Callers

nothing calls this directly

Calls 4

load_configMethod · 0.80
get_serversMethod · 0.80
to_jsonMethod · 0.45
valuesMethod · 0.45

Tested by

no test coverage detected