Skip to content
This repository has been archived by the owner on Apr 19, 2023. It is now read-only.

Commit

Permalink
🐛 Fix bug with membershipId instead of id
Browse files Browse the repository at this point in the history
  • Loading branch information
AnandChowdhary committed Aug 16, 2019
1 parent e68a7fb commit 860ed85
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "staart-manager",
"version": "1.0.131",
"version": "1.0.132",
"main": "index.js",
"repository": "[email protected]:AnandChowdhary/staart.git",
"author": "Anand Chowdhary <[email protected]>",
Expand Down Expand Up @@ -144,5 +144,5 @@
"setup"
],
"snyk": true,
"staart-version": "1.0.131"
"staart-version": "1.0.132"
}
6 changes: 3 additions & 3 deletions src/controllers/v1/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ export class UserController {
@Get(":id/memberships/:membershipId")
async getMembership(req: Request, res: Response) {
const id = await userUsernameToId(req.params.id, res.locals.token.id);
const membershipId = req.params.id;
const membershipId = req.params.membershipId;
joiValidate(
{
id: [Joi.string().required(), Joi.number().required()],
Expand All @@ -182,7 +182,7 @@ export class UserController {
@Delete(":id/memberships/:membershipId")
async deleteMembership(req: Request, res: Response) {
const id = await userUsernameToId(req.params.id, res.locals.token.id);
const membershipId = req.params.id;
const membershipId = req.params.membershipId;
joiValidate(
{
id: [Joi.string().required(), Joi.number().required()],
Expand All @@ -197,7 +197,7 @@ export class UserController {
@Patch(":id/memberships/:membershipId")
async updateMembership(req: Request, res: Response) {
const id = await userUsernameToId(req.params.id, res.locals.token.id);
const membershipId = req.params.id;
const membershipId = req.params.membershipId;
joiValidate(
{
id: [Joi.string().required(), Joi.number().required()],
Expand Down

0 comments on commit 860ed85

Please sign in to comment.