Parcourir la source

修改http协议

neo il y a 1 an
Parent
commit
e15c8f05ab
2 fichiers modifiés avec 8 ajouts et 8 suppressions
  1. 4 4
      nodes/login/controllers/usr.lua
  2. 4 4
      nodes/login/lib/webapp.lua

+ 4 - 4
nodes/login/controllers/usr.lua

@@ -52,7 +52,7 @@ local function l_uuid_register(msg)
52 52
 end
53 53
 
54 54
 -- 快速注册
55
-function root.register(msg)
55
+function root.usr_register(msg)
56 56
     local errCode, ret = l_uuid_register(msg)
57 57
     if errCode then
58 58
         return errCode, ret
@@ -80,7 +80,7 @@ function root.register(msg)
80 80
 end
81 81
 
82 82
 -- 快速登陆
83
-function root.login(msg)
83
+function root.usr_login(msg)
84 84
     log.info("login msg[%s]", tostring(msg))
85 85
     local uid = msg.uid
86 86
     if is_empty(uid) or is_empty(msg.password) then
@@ -138,7 +138,7 @@ function root.login(msg)
138 138
 end
139 139
 
140 140
 -- 注册 - 手机号
141
-function root.registerByPhone(msg)
141
+function root.usr_register_by_phone(msg)
142 142
     local errCode, ret = l_uuid_register(msg)
143 143
     if errCode then
144 144
         return errCode, ret
@@ -167,7 +167,7 @@ function root.registerByPhone(msg)
167 167
     return root.loginByPhone(msg)
168 168
 end
169 169
 -- 登录 - 手机号
170
-function root.loginByPhone(msg)
170
+function root.usr_login_by_phone(msg)
171 171
     log.info("loginByPhone msg[%s]", tostring(msg))
172 172
     local account, password = msg.account, msg.accountPassword
173 173
     if not account or not password then

+ 4 - 4
nodes/login/lib/webapp.lua

@@ -237,9 +237,9 @@ local function SPROTO(name, args, response)
237 237
 		return res.code, res.body, res.headers
238 238
 	end
239 239
 
240
-	local func = controller[method]
240
+	local func = controller[name]
241 241
 	if not func then
242
-		log.error("SPROTO controller[%s] has no method[%s] ", controllerName, method)
242
+		log.error("SPROTO controller[%s] has no name[%s] ", controllerName, name)
243 243
 		res.body = response({code = code.REQUEST_NOT_FOUND})
244 244
 		return res.code, res.body, res.headers
245 245
 	end
@@ -263,8 +263,8 @@ local function l_decode_sproto(ip, headers, path, body)
263 263
 		return
264 264
 	end
265 265
 
266
-	pName = pName:gsub("_", "/")
267
-	pName = string.format("/%s", pName)
266
+	-- pName = pName:gsub("_", "/")
267
+	-- pName = string.format("/%s", pName)
268 268
 	if headers and headers["proxy-client-ip"] then
269 269
 		ip = headers["proxy-client-ip"]
270 270
 	end