eletrotupi / tcc/ commit / a5fffad

frontend: use correct param name for resetting the passwd

Pedro Lucas Porcellis porcellis@eletrotupi.com · 5 months ago a5fffad0b5ed29e526e7deed028bfd0314d9ffe7 Browse files
Parents cd098b6
Changed files
1
Additions
+1
Deletions
-1
frontend/lib/api.ts modified+1 -1
frontend/lib/api.ts
1 1
import * as SecureStore from 'expo-secure-store';
2 2

3 3
const API_BASE_URL = process.env.EXPO_PUBLIC_API_BASE_URL;
4 4
const TOKEN_KEY = process.env.EXPO_PUBLIC_TOKEN_KEY; // Gary B.B Coleman fucking slaps
5 5

109 109
  }
110 110

111 111
  async resetPassword(token: string, password: string): Promise<{ message: string }> {
112 112
    return this.request('/auth/reset-password', {
113 113
      method: 'POST',
114 -
      body: JSON.stringify({ token, password }),
114 +
      body: JSON.stringify({ token, newPassword: password }),
115 115
    });
116 116
  }
117 117

118 118
  async verifyToken(): Promise<{ valid: boolean; userId?: number; email?: string }> {
119 119
    try {
148 148
    })
149 149
  }
150 150
}
151 151

152 152
export const apiClient = new ApiClient();