mirror of
https://github.com/discourse/discourse.git
synced 2024-11-24 07:34:18 +08:00
71f7f7ed49
* 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> |
||
---|---|---|
.. | ||
about_serializer_spec.rb | ||
admin_plugin_serializer_spec.rb | ||
admin_user_list_serializer_spec.rb | ||
basic_group_serializer_spec.rb | ||
basic_group_user_serializer_spec.rb | ||
basic_post_serializer_spec.rb | ||
basic_user_serializer_spec.rb | ||
category_detailed_serializer_spec.rb | ||
category_serializer_spec.rb | ||
category_upload_serializer_spec.rb | ||
current_user_serializer_spec.rb | ||
directory_item_serializer_spec.rb | ||
emoji_serializer_spec.rb | ||
group_show_serializer_spec.rb | ||
listable_topic_serializer_spec.rb | ||
new_post_result_serializer_spec.rb | ||
notification_serializer_spec.rb | ||
pending_post_serializer_spec.rb | ||
post_revision_serializer_spec.rb | ||
post_serializer_spec.rb | ||
reviewable_flagged_post_serializer_spec.rb | ||
reviewable_queued_post_serializer_spec.rb | ||
reviewable_score_serializer_spec.rb | ||
reviewable_serializer_spec.rb | ||
reviewable_user_serializer_spec.rb | ||
single_sign_on_record_serializer_spec.rb | ||
site_serializer_spec.rb | ||
suggested_topic_serializer_spec.rb | ||
tag_group_serializer_spec.rb | ||
theme_serializer_spec.rb | ||
topic_link_serializer_spec.rb | ||
topic_list_item_serializer_spec.rb | ||
topic_list_serializer_spec.rb | ||
topic_view_details_serializer_spec.rb | ||
topic_view_posts_serializer_spec.rb | ||
topic_view_serializer_spec.rb | ||
upload_serializer_spec.rb | ||
user_auth_token_serializer_spec.rb | ||
user_bookmark_serializer_spec.rb | ||
user_card_serializer_spec.rb | ||
user_serializer_spec.rb | ||
user_summary_serializer_spec.rb | ||
web_hook_post_serializer_spec.rb | ||
web_hook_topic_view_serializer_spec.rb | ||
web_hook_user_serializer_spec.rb | ||
wizard_serializer_spec.rb |