Skip to content

Commit 7c5c054

Browse files
authored
Update wp-rest-client.ts
Used another endpoint for authentication
1 parent 55816bc commit 7c5c054

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/wp-rest-client.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ export class WpRestClient extends AbstractWordPressClient {
125125
async validateUser(certificate: WordPressAuthParams): Promise<WordPressClientResult<boolean>> {
126126
try {
127127
const data = await this.client.httpGet(
128-
getUrl(this.context.endpoints?.validateUser, `wp-json/wp/v2/users?search=xxx`),
128+
getUrl(this.context.endpoints?.validateUser, `wp-json/wp/v2/users/me`),
129129
{
130130
headers: this.context.getHeaders(certificate)
131131
});

0 commit comments

Comments
 (0)