Browse Source

get_server_routes -> get_http_server_routes

Vlad Protsenko 6 tháng trước cách đây
mục cha
commit
da6c11d70c
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      docs/en/manuals/editor-scripts.md

+ 2 - 2
docs/en/manuals/editor-scripts.md

@@ -247,11 +247,11 @@ Language server definition table may specify:
 
 ## HTTP server
 
-Every running instance of the editor has an HTTP server running. The server can be extended using editor scripts. To extend the editor HTTP server, you need to add `get_server_routes` editor script function — it should return the additional routes:
+Every running instance of the editor has an HTTP server running. The server can be extended using editor scripts. To extend the editor HTTP server, you need to add `get_http_server_routes` editor script function — it should return the additional routes:
 ```lua
 print("My route: " .. http.server.url .. "/my-extension")
 
-function M.get_server_routes()
+function M.get_http_server_routes()
   return {
     http.server.route("/my-extension", "GET", function(request)
       return http.server.response(200, "Hello world!")