Commit a74954c5bdd579efa4cbcda3dd7200d86147f5f2

Authored by seandong
1 parent ba1ff94f
Exists in master

CHG: more options support to user#create

Showing 1 changed file with 3 additions and 3 deletions   Show diff stats
lib/dingtalk/api/user.rb
@@ -13,12 +13,12 @@ module Dingtalk @@ -13,12 +13,12 @@ module Dingtalk
13 http_get("get_by_mobile?access_token=#{access_token}&mobile=#{mobile}") 13 http_get("get_by_mobile?access_token=#{access_token}&mobile=#{mobile}")
14 end 14 end
15 15
16 - def create(name, mobile, department = [1])  
17 - params = { 16 + def create(name, mobile, department=[1], options={})
  17 + params = options.merge(
18 name: name, 18 name: name,
19 mobile: mobile, 19 mobile: mobile,
20 department: department 20 department: department
21 - } 21 + )
22 http_post("create?access_token=#{access_token}", params) 22 http_post("create?access_token=#{access_token}", params)
23 end 23 end
24 24