mirror of
https://github.com/discourse/discourse.git
synced 2025-06-06 03:06:53 +08:00
DEV: Use category ids in more URLs preferentially
This is a followup to 374534f0
This commit is contained in:
@ -36,7 +36,7 @@ QUnit.test("Editing the category", async assert => {
|
||||
assert.ok(!visible(".d-modal"), "it closes the modal");
|
||||
assert.equal(
|
||||
DiscourseURL.redirectedTo,
|
||||
"/c/bug",
|
||||
"/c/bug/1",
|
||||
"it does one of the rare full page redirects"
|
||||
);
|
||||
});
|
||||
|
@ -265,6 +265,7 @@ export default function() {
|
||||
|
||||
this.put("/categories/:category_id", request => {
|
||||
const category = parsePostData(request.requestBody);
|
||||
category.id = parseInt(request.params.category_id, 10);
|
||||
|
||||
if (category.email_in === "duplicate@example.com") {
|
||||
return response(422, { errors: ["duplicate email"] });
|
||||
|
Reference in New Issue
Block a user