@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('/update-password', JSON.stringify({ username, email, code, password: newPassword }), cancelToken, { 'Content-Type': 'application/json' });
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();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@go-avro/avro-js",
3
- "version": "0.0.2-beta.90",
3
+ "version": "0.0.2-beta.92",
4
4
  "description": "JS client for Avro backend integration.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",