From 3a5080b4698a7846ede3b010245fcc2771c15068 Mon Sep 17 00:00:00 2001 From: Daniel Waterworth Date: Tue, 10 Nov 2020 10:57:25 +0000 Subject: [PATCH] FIX: Renaming and deleting tags (#11169) The REST adapter generates paths with the /tags/ prefix indescriminately, but individual tag paths have been moved under the /tag/ prefix to allow tags with names that would otherwise cause ambiguity like c. --- app/assets/javascripts/discourse/app/adapters/tag.js | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 app/assets/javascripts/discourse/app/adapters/tag.js diff --git a/app/assets/javascripts/discourse/app/adapters/tag.js b/app/assets/javascripts/discourse/app/adapters/tag.js new file mode 100644 index 00000000000..aff21d705e6 --- /dev/null +++ b/app/assets/javascripts/discourse/app/adapters/tag.js @@ -0,0 +1,7 @@ +import RESTAdapter from "discourse/adapters/rest"; + +export default RESTAdapter.extend({ + pathFor(store, type, id) { + return id ? `/tag/${id}` : `/tags`; + }, +});