stacker.news/api/typeDefs
ekzyis 687d71f246
Purchase archived territories (#897)
* Handle archived territories in territory form

* Use dedicated mutation

* Add sanity check for eternal territories

* Fix fields and cost ignored

* Remove no longer needed manual validation in upsertSub

* Remove founder check

* Always check if sub is archived

Using { abortEarly: false } now since previously, if no description was not given, we wouldn't detect if the sub was archived since validation would abort on empty descriptions.

Only on submission all fields would get validated but since we ignore archived errors during submission, the user would never see that the sub is archived before submission
+ the wrong mutation would run if archived is not already true before submission.

Hence, we need to validate all fields always.

There is currently still a bug where the validation does not immediately run but maybe this can be fixed by simply using validateImmediately on the Formik component.

* Fix archived warning not shown after first render

* Only create transfers if owner actually changes

* Reuse helper functions in lib/territory.js

* Rename var to editing

* Use onChange instead of validation override

* Run same validation on server for unarchiving

* Fix 'territory archived' shown during edits

* Use && instead of ternary operator for conditional query

---------

Co-authored-by: Keyan <34140557+huumn@users.noreply.github.com>
2024-03-19 17:23:59 -05:00
..
admin.js Revert "Revert "shield your eyes; massive, squashed refactor; nextjs/react/react-dom/apollo upgrades"" 2023-07-23 10:08:43 -05:00
blockHeight.js Add block height to price carousel (#484) 2023-09-12 10:56:02 -05:00
chainFee.js chain fee should be a float 2023-12-20 19:12:43 -06:00
growth.js Custom date selector for more pages (#567) 2023-11-08 18:15:36 -06:00
image.js Image uploads (#576) 2023-11-06 14:53:33 -06:00
index.js Add chain fees to price carousel (#658) 2023-12-20 16:06:22 -06:00
invite.js upgrade to prisma 4 2023-07-26 19:18:42 -05:00
item.js better link rel attr handling 2024-03-04 19:20:14 -06:00
itemForward.js multiple forwards on a post (#403) 2023-08-23 17:44:17 -05:00
lnurl.js remove slashtags temporarily 2023-08-16 19:49:00 -05:00
message.js Revert "Revert "shield your eyes; massive, squashed refactor; nextjs/react/react-dom/apollo upgrades"" 2023-07-23 10:08:43 -05:00
notifications.js Territory transfers (#878) 2024-03-05 13:56:02 -06:00
price.js Revert "Revert "shield your eyes; massive, squashed refactor; nextjs/react/react-dom/apollo upgrades"" 2023-07-23 10:08:43 -05:00
referrals.js Custom date selector for more pages (#567) 2023-11-08 18:15:36 -06:00
rewards.js Monthly rewards (#890) 2024-03-01 10:28:55 -06:00
sub.js Purchase archived territories (#897) 2024-03-19 17:23:59 -05:00
upload.js Image uploads (#576) 2023-11-06 14:53:33 -06:00
user.js Add setting for no referral links on copy 2024-03-17 16:23:03 +01:00
wallet.js LND autowithdraw (#806) 2024-02-13 13:17:56 -06:00