diff --git a/server/src/server/router/ir/lr2hook/router.test.ts b/server/src/server/router/ir/lr2hook/router.test.ts index 18454251f..99ca9f263 100644 --- a/server/src/server/router/ir/lr2hook/router.test.ts +++ b/server/src/server/router/ir/lr2hook/router.test.ts @@ -63,7 +63,7 @@ t.test("POST /ir/lr2hook/import", (t) => { t.end(); }); -t.test("POST /ir/lr2hook/import-course", (t) => { +t.test("POST /ir/lr2hook/import/course", (t) => { t.beforeEach(ResetDBState); const classBody: LR2HookScore = { @@ -92,7 +92,7 @@ t.test("POST /ir/lr2hook/import-course", (t) => { t.test("Should update a user's class if necessary.", async (t) => { const res = await mockApi - .post("/ir/lr2hook/import-course") + .post("/ir/lr2hook/import/course") .set("Authorization", "Bearer fake_api_token") .send(classBody); @@ -113,7 +113,7 @@ t.test("POST /ir/lr2hook/import-course", (t) => { t.test("Should not update a user's class if they didn't clear the course.", async (t) => { const res = await mockApi - .post("/ir/lr2hook/import-course") + .post("/ir/lr2hook/import/course") .set("Authorization", "Bearer fake_api_token") .send(deepmerge(classBody, { scoreData: { notesPlayed: 1 } })); @@ -133,7 +133,7 @@ t.test("POST /ir/lr2hook/import-course", (t) => { t.test("Should 404 if the course doesn't exist.", async (t) => { const res = await mockApi - .post("/ir/lr2hook/import-course") + .post("/ir/lr2hook/import/course") .set("Authorization", "Bearer fake_api_token") .send(deepmerge(classBody, { md5: "some nonsense" })); diff --git a/server/src/server/router/ir/lr2hook/router.ts b/server/src/server/router/ir/lr2hook/router.ts index 4d52c52df..ad7bc9fd8 100644 --- a/server/src/server/router/ir/lr2hook/router.ts +++ b/server/src/server/router/ir/lr2hook/router.ts @@ -31,9 +31,9 @@ router.post("/import", async (req, res) => { /** * Import a course in the LR2Hook format. * - * @name POST /ir/lr2hook/import-course + * @name POST /ir/lr2hook/import/course */ -router.post("/import-course", prValidate(PR_LR2Hook), async (req, res) => { +router.post("/import/course", prValidate(PR_LR2Hook), async (req, res) => { // notably, courses in LR2 are actually identical to scores. They have all // the same fields in all the same ways. The only significant difference is that // the md5 field is 4 fields conjoined, rather than just one.