From de5f36e93b0b2824ec5f0f58f49e118c1ff044b0 Mon Sep 17 00:00:00 2001 From: Pierluigi Viti Date: Fri, 20 Dec 2024 11:00:57 +0100 Subject: [PATCH] fix: fix singleton path --- gen/templates/singleton.tpl | 2 +- gen/templates/singleton_update.tpl | 2 +- src/resources/users.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gen/templates/singleton.tpl b/gen/templates/singleton.tpl index 6449aaf..1130175 100644 --- a/gen/templates/singleton.tpl +++ b/gen/templates/singleton.tpl @@ -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()) } \ No newline at end of file diff --git a/gen/templates/singleton_update.tpl b/gen/templates/singleton_update.tpl index f2182ef..0d7e609 100644 --- a/gen/templates/singleton_update.tpl +++ b/gen/templates/singleton_update.tpl @@ -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()) } \ No newline at end of file diff --git a/src/resources/users.ts b/src/resources/users.ts index 512e07a..bdb286b 100644 --- a/src/resources/users.ts +++ b/src/resources/users.ts @@ -76,7 +76,7 @@ class Users extends ApiSingleton { static readonly TYPE: UserType = 'users' as const async update(resource: UserUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise { - return this.resources.update({ ...resource, type: Users.TYPE }, params, options) + return this.resources.update({ ...resource, type: Users.TYPE }, params, options, this.path()) }