Skip to content

Commit

Permalink
fix: accept requests without trailing slashes
Browse files Browse the repository at this point in the history
Co-authored-by: Niraj Nandish <nirajnandish@icloud.com>
  • Loading branch information
ojeytonwilliams and Nirajn2311 committed Nov 27, 2023
1 parent 6a77afe commit 950ad6e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ module.exports = (plugin) => {

plugin.routes["content-api"].routes.unshift({
method: "PUT",
path: "/auth/accept-invitation/",
path: "/auth/accept-invitation",
handler: "auth.acceptInvitation",
config: {
prefix: "",
Expand Down
2 changes: 1 addition & 1 deletion apps/backend/tests/auth/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ describe("auth", () => {
const invitedUserToken = await getUserJWT(invitedUserData.username);

const res = await request(strapi.server.httpServer)
.put("/api/auth/accept-invitation/")
.put("/api/auth/accept-invitation")
.auth(invitedUserToken, { type: "bearer" });

expect(res.status).toEqual(200);
Expand Down

0 comments on commit 950ad6e

Please sign in to comment.