🔖 fix: URI Encoding for Bookmarks (#4172)

* fix: never defined AcceptTermsMutationOptions

* fix: lack of URI encoding in tag mutations
This commit is contained in:
Danny Avila 2024-09-21 09:06:02 -04:00 committed by GitHub
parent be44caaab1
commit 44458d3832
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 14 additions and 4 deletions

View file

@ -61,7 +61,8 @@ router.post('/', async (req, res) => {
*/
router.put('/:tag', async (req, res) => {
try {
const tag = await updateConversationTag(req.user.id, req.params.tag, req.body);
const decodedTag = decodeURIComponent(req.params.tag);
const tag = await updateConversationTag(req.user.id, decodedTag, req.body);
if (tag) {
res.status(200).json(tag);
} else {
@ -81,7 +82,8 @@ router.put('/:tag', async (req, res) => {
*/
router.delete('/:tag', async (req, res) => {
try {
const tag = await deleteConversationTag(req.user.id, req.params.tag);
const decodedTag = decodeURIComponent(req.params.tag);
const tag = await deleteConversationTag(req.user.id, decodedTag);
if (tag) {
res.status(200).json(tag);
} else {