DEV: /channel -> /c chat route rename (#19782)

* DEV: Rnemae channel path to just c

Also swap the channel id and channel slug params to be consistent with core.

* linting

* channel_path

* params in wrong order

* Drop slugify helper and channel route without slug

* Request slug and route models through the channel model if possible

* Add client side redirection for backwards-compatibility

Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com>
This commit is contained in:
Roman Rizzi
2023-01-27 09:58:12 -03:00
committed by GitHub
parent 079e1108f1
commit d07b472b79
54 changed files with 171 additions and 152 deletions

View File

@ -52,9 +52,9 @@ module(
assert.strictEqual(
query(".chat-invitation a").getAttribute("href"),
`/chat/channel/${data.chat_channel_id}/${slugifyChannel({
`/chat/c/${slugifyChannel({
title: data.chat_channel_title,
})}?messageId=${data.chat_message_id}`
})}/${data.chat_channel_id}?messageId=${data.chat_message_id}`
);
});
}
@ -91,9 +91,9 @@ module(
assert.strictEqual(
query(".chat-invitation a").getAttribute("href"),
`/chat/channel/${data.chat_channel_id}/${slugifyChannel({
`/chat/c/${slugifyChannel({
title: data.chat_channel_title,
})}?messageId=${data.chat_message_id}`
})}/${data.chat_channel_id}?messageId=${data.chat_message_id}`
);
});
}
@ -130,9 +130,9 @@ module(
assert.strictEqual(
query(".chat-invitation a").getAttribute("href"),
`/chat/channel/${data.chat_channel_id}/${slugifyChannel({
`/chat/c/${slugifyChannel({
title: data.chat_channel_title,
})}?messageId=${data.chat_message_id}`
})}/${data.chat_channel_id}?messageId=${data.chat_message_id}`
);
});
}