@@ -27,7 +27,7 @@ export class WechatWorkContactsService {
27
27
this . logger . log ( `[getUserInfo] userId cannot be empty` ) ;
28
28
throw new HttpException ( '[getUserInfo] userId cannot be empty' , HttpStatus . BAD_REQUEST ) ;
29
29
}
30
- const accessToken = await this . wechatWorkBaseService . getAccessToken ( AgentType . Contacts ) ;
30
+ const accessToken = await this . wechatWorkBaseService . getAccessToken ( AgentType . Custom ) ;
31
31
const result = await this . httpService . get (
32
32
`${ this . apiServer } /cgi-bin/user/get?access_token=${ accessToken } &userid=${ userId } `
33
33
) . toPromise ( ) ;
@@ -52,7 +52,7 @@ export class WechatWorkContactsService {
52
52
this . logger . log ( `[getDepartmentList] userId cannot be empty` ) ;
53
53
throw new HttpException ( '[getDepartmentList] userId cannot be empty' , HttpStatus . BAD_REQUEST ) ;
54
54
}
55
- const accessToken = await this . wechatWorkBaseService . getAccessToken ( AgentType . Contacts ) ;
55
+ const accessToken = await this . wechatWorkBaseService . getAccessToken ( AgentType . Custom ) ;
56
56
const result = await this . httpService . get (
57
57
`${ this . apiServer } /cgi-bin/department/list?access_token=${ accessToken } &id=${ id } `
58
58
) . toPromise ( ) ;
@@ -72,7 +72,7 @@ export class WechatWorkContactsService {
72
72
}
73
73
74
74
async getAllDepartmentList ( ) : Promise < Result & WechatWorkData > {
75
- const accessToken = await this . wechatWorkBaseService . getAccessToken ( AgentType . Contacts ) ;
75
+ const accessToken = await this . wechatWorkBaseService . getAccessToken ( AgentType . Custom ) ;
76
76
const result = await this . httpService . get (
77
77
`${ this . apiServer } /cgi-bin/department/list?access_token=${ accessToken } `
78
78
) . toPromise ( ) ;
0 commit comments