@malevich-studio/strapi-sdk-typescript 1.2.22 → 1.2.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.cjs +6 -3
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.mjs +6 -3
- package/dist/cli.mjs.map +1 -1
- package/dist/index.cjs +5 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +5 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/cli.cjs
CHANGED
|
@@ -21433,7 +21433,7 @@ class Strapi {
|
|
|
21433
21433
|
...params,
|
|
21434
21434
|
});
|
|
21435
21435
|
}
|
|
21436
|
-
async
|
|
21436
|
+
async updateBaseUser(endpoint, id, data, params = {}) {
|
|
21437
21437
|
return await this.fetchData(`${endpoint}/${id}`, data, {
|
|
21438
21438
|
method: 'PUT',
|
|
21439
21439
|
...params,
|
|
@@ -21464,7 +21464,10 @@ class Strapi {
|
|
|
21464
21464
|
try {
|
|
21465
21465
|
data = await response?.json() || null;
|
|
21466
21466
|
}
|
|
21467
|
-
catch (error) {
|
|
21467
|
+
catch (error) {
|
|
21468
|
+
console.error(await response.text());
|
|
21469
|
+
throw error;
|
|
21470
|
+
}
|
|
21468
21471
|
log(mergedParams);
|
|
21469
21472
|
log(response);
|
|
21470
21473
|
log(data);
|
|
@@ -21974,7 +21977,7 @@ function generateMethodsCode(contentType, permissions) {
|
|
|
21974
21977
|
].join('\n'));
|
|
21975
21978
|
methods.push([
|
|
21976
21979
|
` public async update${getContentTypeName(contentType.schema.singularName)}(id: string, data: ${modelName}Input, params?: RequestInit) {`,
|
|
21977
|
-
` return await this.update${modelName === 'User' ? '
|
|
21980
|
+
` return await this.update${modelName === 'User' ? 'BaseUser' : ''}<${modelName}, ${modelName}Input>('${contentType.schema.pluralName}', id, data, params);`,
|
|
21978
21981
|
' }',
|
|
21979
21982
|
].join('\n'));
|
|
21980
21983
|
methods.push([
|