瀏覽代碼

Merge pull request #1290 from emqtt/develop

Bug fixed for users api
huangdan 8 年之前
父節點
當前提交
63beb4e62a
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/emqttd_rest_api.erl

+ 2 - 2
src/emqttd_rest_api.erl

@@ -66,9 +66,9 @@
 -http_api({"^users/?$", 'GET', users, []}).
 -http_api({"^users/?$", 'GET', users, []}).
 -http_api({"^users/?$", 'POST', users, [{<<"username">>, binary},
 -http_api({"^users/?$", 'POST', users, [{<<"username">>, binary},
                                         {<<"password">>, binary},
                                         {<<"password">>, binary},
-                                        {<<"tag">>, binary}]}).
+                                        {<<"tags">>, binary}]}).
 -http_api({"^users/(.+?)/?$", 'GET', users, []}).
 -http_api({"^users/(.+?)/?$", 'GET', users, []}).
--http_api({"^users/(.+?)/?$", 'PUT', users, []}).
+-http_api({"^users/(.+?)/?$", 'PUT', users, [{<<"tags">>, binary}]}).
 -http_api({"^users/(.+?)/?$", 'DELETE', users, []}).
 -http_api({"^users/(.+?)/?$", 'DELETE', users, []}).
 
 
 -http_api({"^auth/?$", 'POST', auth, [{<<"username">>, binary}, {<<"password">>, binary}]}).
 -http_api({"^auth/?$", 'POST', auth, [{<<"username">>, binary}, {<<"password">>, binary}]}).