mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-12-04 18:04:18 +00:00
fix(place-contrib): re-check consent inside the catch-up step and never share withdrawn history again
The catch-up read its state outside its transaction and could revive a backfill a withdraw had just ended; switching a field off and on after a withdrawal shared the withdrawn history again. The catch-up now resolves the country the way a save does and reads one field map.
This commit is contained in:
@@ -114,6 +114,13 @@ export const placeContribConsentSchema = z.object({
|
||||
* later catch up too. Absent on an agreement from 5.1.0.
|
||||
*/
|
||||
includesEarlier: z.boolean().optional(),
|
||||
/**
|
||||
* The fields an admin withdrew under this agreement (all of them after
|
||||
* "withdraw everything"). Switching one of them on again shares what users
|
||||
* type from then on, not the history taken back; a new agreement clears it.
|
||||
* Absent until something was withdrawn.
|
||||
*/
|
||||
withdrawnFields: z.array(placeContribFieldSchema).optional(),
|
||||
});
|
||||
export type PlaceContribConsent = z.infer<typeof placeContribConsentSchema>;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user