DEV: Use category ids in more URLs preferentially

This is a followup to 374534f0
This commit is contained in:
Daniel Waterworth
2019-12-04 09:12:45 +00:00
parent bb69e8942e
commit 6e5fedb312
5 changed files with 5 additions and 4 deletions

View File

@ -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"
);
});

View File

@ -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"] });