Skip to content
This repository was archived by the owner on Feb 8, 2024. It is now read-only.

Commit 125ff86

Browse files
committed
Fix resoures creation of memberId
1 parent 74746c4 commit 125ff86

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,7 @@ export class Maker {
494494
|| (options.only && options.only.length && options.only.includes(methodName))
495495
|| (options.except && options.except.length && !options.except.includes(methodName))
496496

497-
const memberId = `:${options.memberId}` || `:${pluralize.singular}Id`
497+
const memberId = options.memberId || `${pluralize.singular(name)}Id`
498498

499499
this.scope(name, scope => {
500500
scope.beforeEach(controller.beforeEach)
@@ -508,7 +508,7 @@ export class Maker {
508508
scope.post('/', controller.create)
509509
}
510510

511-
scope.scope(memberId, member => {
511+
scope.scope(`:${memberId}`, member => {
512512
if (checkMethod('read')) {
513513
member.get('/', controller.read)
514514
}

0 commit comments

Comments
 (0)