Skip to content

Commit

Permalink
fix: fix singleton path
Browse files Browse the repository at this point in the history
  • Loading branch information
pviti committed Dec 20, 2024
1 parent 55ecca4 commit de5f36e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion gen/templates/singleton.tpl
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
async retrieve(params?: QueryParamsRetrieve<##__RESOURCE_RESPONSE_CLASS__##>, options?: ResourcesConfig): Promise<##__RESOURCE_RESPONSE_CLASS__##> {
return this.resources.retrieve<##__RESOURCE_RESPONSE_CLASS__##>({ type: ##__RESOURCE_CLASS__##.TYPE }, params, options)
return this.resources.retrieve<##__RESOURCE_RESPONSE_CLASS__##>({ type: ##__RESOURCE_CLASS__##.TYPE }, params, options, this.path())
}
2 changes: 1 addition & 1 deletion gen/templates/singleton_update.tpl
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
async update(resource: ##__RESOURCE_REQUEST_CLASS__##, params?: QueryParamsRetrieve<##__RESOURCE_RESPONSE_CLASS__##>, options?: ResourcesConfig): Promise<##__RESOURCE_RESPONSE_CLASS__##> {
return this.resources.update<##__RESOURCE_REQUEST_CLASS__##, ##__RESOURCE_RESPONSE_CLASS__##>({ ...resource, type: ##__RESOURCE_CLASS__##.TYPE }, params, options)
return this.resources.update<##__RESOURCE_REQUEST_CLASS__##, ##__RESOURCE_RESPONSE_CLASS__##>({ ...resource, type: ##__RESOURCE_CLASS__##.TYPE }, params, options, this.path())
}
2 changes: 1 addition & 1 deletion src/resources/users.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class Users extends ApiSingleton<User> {
static readonly TYPE: UserType = 'users' as const

async update(resource: UserUpdate, params?: QueryParamsRetrieve<User>, options?: ResourcesConfig): Promise<User> {
return this.resources.update<UserUpdate, User>({ ...resource, type: Users.TYPE }, params, options)
return this.resources.update<UserUpdate, User>({ ...resource, type: Users.TYPE }, params, options, this.path())
}


Expand Down

0 comments on commit de5f36e

Please sign in to comment.