discourse/app
Blake Erickson 71f7f7ed49
FEATURE: Add external_id to topics (#15825)
* FEATURE: Add external_id to topics

This commit allows for topics to be created and fetched by an
external_id. These changes are API only for now as there aren't any
front changes.

* add annotations

* add external_id to this spec

* Several PR feedback changes

- Add guardian to find topic
- 403 is returned for not found as well now
- add `include_external_id?`
- external_id is now case insensitive
- added test for posts_controller
- added test for topic creator
- created constant for max length
- check that it redirects to the correct path
- restrain external id in routes file

* remove puts

* fix tests

* only check for external_id in webhook if exists

* Update index to exclude external_id if null

* annotate

* Update app/controllers/topics_controller.rb

We need to check whether the topic is present first before passing it to the guardian.

Co-authored-by: Alan Guo Xiang Tan <gxtan1990@gmail.com>

* Apply suggestions from code review

Co-authored-by: Alan Guo Xiang Tan <gxtan1990@gmail.com>

Co-authored-by: Alan Guo Xiang Tan <gxtan1990@gmail.com>
2022-02-08 20:55:32 -07:00
..
assets Revert "DEV: Prioritize full name when setting active (#15820)" (#15869) 2022-02-08 13:25:19 -06:00
controllers FEATURE: Add external_id to topics (#15825) 2022-02-08 20:55:32 -07:00
helpers Revert "PERF: Update ember-auto-import (#15814)" (#15854) 2022-02-07 22:41:07 +00:00
jobs DEV: Fix typo. (#15857) 2022-02-08 09:04:53 +08:00
mailers FEATURE: Allow sending group SMTP emails with from alias (#15687) 2022-02-07 13:52:01 +10:00
models FEATURE: Add external_id to topics (#15825) 2022-02-08 20:55:32 -07:00
serializers FEATURE: Add external_id to topics (#15825) 2022-02-08 20:55:32 -07:00
services FIX: Further reduce the input of to_tsvector (#15716) 2022-02-07 23:03:01 +02:00
views Revert "PERF: Update ember-auto-import (#15814)" (#15854) 2022-02-07 22:41:07 +00:00