Commit 74a63ecaa9b54e069e17768f5b6e5b045f0baa8a

Authored by nickcen
Committed by lanrion
1 parent f4037ae7
Exists in master

list specified department (#26)

Showing 1 changed file with 6 additions and 2 deletions   Show diff stats
lib/qy_wechat_api/api/department.rb
... ... @@ -32,8 +32,12 @@ module QyWechatApi
32 32 http_get("delete", id: id)
33 33 end
34 34  
35   - def list
36   - http_get("list")
  35 + def list(id = nil)
  36 + if id
  37 + http_get("list", id: id)
  38 + else
  39 + http_get("list")
  40 + end
37 41 end
38 42  
39 43 private
... ...