@szymonpiatek/nextwordpress 0.0.16 → 0.0.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/index.cjs +5 -4
- package/dist/client/index.cjs.map +1 -1
- package/dist/client/index.d.cts +1 -1
- package/dist/client/index.d.ts +1 -1
- package/dist/client/index.js +5 -4
- package/dist/client/index.js.map +1 -1
- package/dist/hooks/index.cjs +5 -4
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.d.cts +1 -1
- package/dist/hooks/index.d.ts +1 -1
- package/dist/hooks/index.js +5 -4
- package/dist/hooks/index.js.map +1 -1
- package/dist/index.cjs +5 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +5 -4
- package/dist/index.js.map +1 -1
- package/dist/server/index.cjs +5 -4
- package/dist/server/index.cjs.map +1 -1
- package/dist/server/index.d.cts +1 -1
- package/dist/server/index.d.ts +1 -1
- package/dist/server/index.js +5 -4
- package/dist/server/index.js.map +1 -1
- package/dist/{types-CvO7Ijbs.d.cts → types-DVzJO3P-.d.cts} +0 -3
- package/dist/{types-CvO7Ijbs.d.ts → types-DVzJO3P-.d.ts} +0 -3
- package/package.json +1 -1
package/dist/client/index.cjs
CHANGED
|
@@ -312,9 +312,6 @@ var GQL_SEND_PASSWORD_RESET_EMAIL = `
|
|
|
312
312
|
mutation SendPasswordResetEmail($input: SendPasswordResetEmailInput!) {
|
|
313
313
|
sendPasswordResetEmail(input: $input) {
|
|
314
314
|
success
|
|
315
|
-
user {
|
|
316
|
-
email
|
|
317
|
-
}
|
|
318
315
|
}
|
|
319
316
|
}
|
|
320
317
|
`;
|
|
@@ -333,7 +330,11 @@ function createPasswordResetMutations(fetcher) {
|
|
|
333
330
|
const { gqlMutate } = fetcher;
|
|
334
331
|
async function sendPasswordResetEmail(input) {
|
|
335
332
|
const data = await gqlMutate(GQL_SEND_PASSWORD_RESET_EMAIL, { input });
|
|
336
|
-
|
|
333
|
+
const result = data.sendPasswordResetEmail;
|
|
334
|
+
if (!result.success) {
|
|
335
|
+
throw new WPGraphQLError(ErrorCode.GQL_ERRORS_IN_RESPONSE, 200, "sendPasswordResetEmail", "User not found");
|
|
336
|
+
}
|
|
337
|
+
return result;
|
|
337
338
|
}
|
|
338
339
|
async function resetUserPassword(input) {
|
|
339
340
|
const data = await gqlMutate(GQL_RESET_USER_PASSWORD, { input });
|