mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-06-20 22:01:45 +00:00
Clean up dead code, dedupe helpers, fix the reset-password contract
- Remove server exports orphaned by the Express removal: the immich album-link helpers, seven route-only service exports, getFileByIdFull; de-export internal-only helpers (utcSuffix). - De-duplicate verifyTripAccess (9 identical copies -> services/tripAccess.ts) and avatarUrl (3 -> services/avatarUrl.ts); name the bcrypt cost (BCRYPT_COST) and the email regex (EMAIL_REGEX). Public API unchanged. - resetPasswordRequestSchema declared `password`, but the client sends and the service reads `new_password` — rename it so the contract matches and the client types resolve. - Make ATLAS-013 deterministic: stub the admin-1 GeoJSON download instead of fetching ~4600 features from GitHub during the test (it hung the suite).
This commit is contained in:
@@ -29,7 +29,9 @@ export type ForgotPasswordRequest = z.infer<typeof forgotPasswordRequestSchema>;
|
||||
|
||||
export const resetPasswordRequestSchema = z.object({
|
||||
token: z.string(),
|
||||
password: z.string(),
|
||||
// The client sends `new_password` and the service reads `body.new_password`;
|
||||
// the field was misnamed `password` here, which broke the client's typing.
|
||||
new_password: z.string(),
|
||||
mfa_code: z.string().optional(),
|
||||
});
|
||||
export type ResetPasswordRequest = z.infer<typeof resetPasswordRequestSchema>;
|
||||
|
||||
Reference in New Issue
Block a user