Commit Graph

21 Commits

Author SHA1 Message Date
Conrad Hoffmann d637723564 Uppercase the Visibility enum keys
There is currently a mismatch, causing for example project creation via
the web interface to fail, because the validation code is using the enum
keys, which are lowercase, but everything else uses uppercase.

Simply use uppercase everywhere, like already the case in other
services.
2022-07-01 09:18:57 +02:00
Conrad Hoffmann d52edefe18 Avoid adding lists to project multiple times
If a list exists already it might also already be connected to the
project. If that is the case, simply skip processing this list.

Fixes: https://todo.sr.ht/~sircmpwn/hub.sr.ht/83
2022-03-14 12:55:29 +01:00
Drew DeVault 9add0bfac7 mailing lists: fetch lists on validation error
This fixes a crash which would occur if you had a validation error in
your form submission.
2021-08-09 09:06:51 +02:00
Drew DeVault 47d6ec09a1 Implement mailing list removal 2020-07-08 12:19:54 -04:00
Drew DeVault d53f622d54 Mailing lists: use unmodified name for desc lookup 2020-04-29 13:36:23 -04:00
Drew DeVault 99f5564750 Fix invalid mailing list names 2020-04-29 13:34:06 -04:00
Drew DeVault 7d1cb671f3 Better handling of private or unlisted resources 2020-04-29 13:25:49 -04:00
Drew DeVault 4028656cd2 Correct syntax error
God dammit
2020-04-29 12:11:53 -04:00
Drew DeVault b5ddb82dd0 Fix validation errors on new list 2020-04-29 12:07:34 -04:00
Drew DeVault 8bafcc57c6 mailing lists: raise exception on create failure 2020-04-29 11:56:20 -04:00
Drew DeVault 15280eb32f Don't require login to view resource lists 2020-04-29 10:18:14 -04:00
Drew DeVault ef585b6e3f Prevent user from adding duplicate resources 2020-04-29 09:59:53 -04:00
Drew DeVault 15a3556c64 Rig up mailing list webhooks 2020-04-23 13:52:03 -04:00
Drew DeVault 3d11d5dfe4 Flesh out webhooks somewhat
This handles deletion of the remote resource
2020-04-08 14:33:16 -04:00
Drew DeVault e0326ac0e2 Refactor webhooks to be more discrete 2020-04-06 16:19:07 -04:00
Drew DeVault ab1cb8e381 Implement mailing lists from templates 2020-04-02 13:53:23 -04:00
Drew DeVault e3cae053b9 Resource addition: fix searching and creation 2020-04-02 13:38:28 -04:00
Drew DeVault 6115640e84 Implement mailing list removal 2020-04-01 14:50:42 -04:00
Drew DeVault 163ca0f629 Reorganize templates 2020-04-01 13:40:54 -04:00
Drew DeVault 6300a914e4 Rename top-level routes for resource lists 2020-04-01 13:36:13 -04:00
Drew DeVault 09e18897b6 Move mailing list routes to separate blueprint 2020-04-01 13:35:25 -04:00