@digione/node-custom-api 0.1.9-alpha15 → 0.1.9-alpha16

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digione/node-custom-api",
3
- "version": "0.1.9-alpha15",
3
+ "version": "0.1.9-alpha16",
4
4
  "description": "Typescript node digione-api",
5
5
  "author": "Monchai Jirayupong <monchai.j@seven.co.th>",
6
6
  "license": "MIT",
package/utils/db.js CHANGED
@@ -37,7 +37,7 @@ const genWhere = (where = {}, { as = "", delimiter = ".", prefix = true, bracket
37
37
  let rawWhere = (Object.keys(where).concat(symbolKeys)).reduce((result, key) => {
38
38
  let value = where[key];
39
39
  if (typeof value !== 'undefined') {
40
- key = typeof (key) == "string" ? keyPrefix + "`" + key + "`" : key;
40
+ key = typeof (key) == "string" ? keyPrefix + "`" + (key.split('.').join("`.`")) + "`" : key;
41
41
  if (typeof (value) == "string") {
42
42
  value = SqlString.escape(value);
43
43
  }
package/utils/file.d.ts CHANGED
@@ -191,7 +191,8 @@ export declare class FileUtil {
191
191
  width?: number;
192
192
  height?: number;
193
193
  }): any;
194
- uploadRawFormat(files: Array<any>, { field }?: {
194
+ uploadRawFormat(files: Array<any>, { format, field }?: {
195
+ format?: boolean;
195
196
  field?: string[];
196
197
  }): Promise<any>;
197
198
  updateFile(id: string, input?: any, { paths }?: {
package/utils/file.js CHANGED
@@ -642,10 +642,10 @@ class FileUtil {
642
642
  }
643
643
  });
644
644
  }
645
- uploadRawFormat(files, { field = ['name', 'filename', 'path', 'mimetype', 'filesize', 'extension', 'type', 'height', 'width'] } = {}) {
645
+ uploadRawFormat(files, { format = false, field = ['name', 'filename', 'path', 'mimetype', 'filesize', 'extension', 'type', 'height', 'width'] } = {}) {
646
646
  return tslib_1.__awaiter(this, void 0, void 0, function* () {
647
647
  let query = yield this.uploadRaw(files);
648
- return yield this.formatFile(0, 0, files, query, { format: true, field });
648
+ return yield this.formatFile(0, 0, files, query, { format, field });
649
649
  });
650
650
  }
651
651
  updateFile(id, input = {}, { paths = [] } = {}) {