Changeset ae83647 for petify-frontend/src/api/auth.ts
- Timestamp:
- 06/26/26 16:32:12 (45 hours ago)
- Branches:
- master
- Parents:
- fa32d0f
- File:
-
- 1 edited
-
petify-frontend/src/api/auth.ts (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
petify-frontend/src/api/auth.ts
rfa32d0f rae83647 24 24 } 25 25 message?: string 26 } 27 28 export interface ChangePasswordRequest { 29 userId: number 30 currentPassword: string 31 newPassword: string 32 } 33 34 export interface ForgotPasswordRequest { 35 identifier: string 26 36 } 27 37 … … 141 151 return { message: data.message || "Registration successful" } 142 152 } 153 154 export async function changePassword(payload: ChangePasswordRequest, options?: { signal?: AbortSignal }): Promise<void> { 155 await postJson<{ message?: string }>('/api/auth/change-password', payload, options) 156 } 157 158 export async function forgotPassword(payload: ForgotPasswordRequest, options?: { signal?: AbortSignal }): Promise<string> { 159 const data = await postJson<{ message?: string }>('/api/auth/forgot-password', payload, options) 160 return data.message || 'If an account matches that username or email, a temporary password has been sent.' 161 }
Note:
See TracChangeset
for help on using the changeset viewer.
