@go-avro/avro-js 0.0.2-beta.90 → 0.0.2-beta.92
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.
|
@@ -84,6 +84,7 @@ export class AvroQueryClient {
|
|
|
84
84
|
}
|
|
85
85
|
throw new StandardError(401, 'Invalid login response');
|
|
86
86
|
}
|
|
87
|
+
this._isAuthenticated = true;
|
|
87
88
|
this.socket.auth = { token: resp.access_token };
|
|
88
89
|
if (!this.socket.connected) {
|
|
89
90
|
this.socket.connect();
|
|
@@ -119,7 +120,7 @@ export class AvroQueryClient {
|
|
|
119
120
|
const queryClient = useQueryClient();
|
|
120
121
|
return useMutation({
|
|
121
122
|
mutationFn: async ({ username, email, code, newPassword, cancelToken }) => {
|
|
122
|
-
await this.post(
|
|
123
|
+
await this.post(`/user/${username ?? email}/password`, JSON.stringify({ code, password: newPassword }), cancelToken, { 'Content-Type': 'application/json' });
|
|
123
124
|
},
|
|
124
125
|
onSettled: () => {
|
|
125
126
|
queryClient.invalidateQueries();
|