new(core.gbapp): Timestamp fields are now default.
This commit is contained in:
parent
d3a2d55a7d
commit
7becf2980d
1 changed files with 18 additions and 14 deletions
|
@ -171,22 +171,22 @@ export class SystemKeywords {
|
||||||
if (date) {
|
if (date) {
|
||||||
return array
|
return array
|
||||||
? array.sort((a, b) => {
|
? array.sort((a, b) => {
|
||||||
const c = new Date(a[memberName]);
|
const c = new Date(a[memberName]);
|
||||||
const d = new Date(b[memberName]);
|
const d = new Date(b[memberName]);
|
||||||
return c.getTime() - d.getTime();
|
return c.getTime() - d.getTime();
|
||||||
})
|
})
|
||||||
: null;
|
: null;
|
||||||
} else {
|
} else {
|
||||||
return array
|
return array
|
||||||
? array.sort((a, b) => {
|
? array.sort((a, b) => {
|
||||||
if (a[memberName] < b[memberName]) {
|
if (a[memberName] < b[memberName]) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
if (a[memberName] > b[memberName]) {
|
if (a[memberName] > b[memberName]) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
})
|
})
|
||||||
: array;
|
: array;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -749,6 +749,10 @@ export class SystemKeywords {
|
||||||
public async saveToStorageBatch({ pid, table, rows }): Promise<void> {
|
public async saveToStorageBatch({ pid, table, rows }): Promise<void> {
|
||||||
const { min } = await DialogKeywords.getProcessInfo(pid);
|
const { min } = await DialogKeywords.getProcessInfo(pid);
|
||||||
|
|
||||||
|
if (typeof rows === 'object' && rows !== null) {
|
||||||
|
rows = [rows];
|
||||||
|
}
|
||||||
|
|
||||||
if (rows.length === 0) {
|
if (rows.length === 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -952,7 +956,7 @@ export class SystemKeywords {
|
||||||
GBLogEx.info(min, `GET '${addressOrHeaders}' in '${file}'.`);
|
GBLogEx.info(min, `GET '${addressOrHeaders}' in '${file}'.`);
|
||||||
let { baseUrl, client } = await GBDeployer.internalGetDriveClient(min);
|
let { baseUrl, client } = await GBDeployer.internalGetDriveClient(min);
|
||||||
const botId = min.instance.botId;
|
const botId = min.instance.botId;
|
||||||
|
|
||||||
const packagePath = GBUtil.getGBAIPath(botId, 'gbdata');
|
const packagePath = GBUtil.getGBAIPath(botId, 'gbdata');
|
||||||
|
|
||||||
let document = await this.internalGetDocument(client, baseUrl, packagePath, file);
|
let document = await this.internalGetDocument(client, baseUrl, packagePath, file);
|
||||||
|
@ -2616,7 +2620,7 @@ export class SystemKeywords {
|
||||||
public async getExtensionInfo(ext: any): Promise<any> {
|
public async getExtensionInfo(ext: any): Promise<any> {
|
||||||
|
|
||||||
// TODO: Load exts.
|
// TODO: Load exts.
|
||||||
|
|
||||||
let array = []; // exts.filter((v, i, a) => a[i]['extension'] === ext);
|
let array = []; // exts.filter((v, i, a) => a[i]['extension'] === ext);
|
||||||
if (array[0]) {
|
if (array[0]) {
|
||||||
return array[0];
|
return array[0];
|
||||||
|
|
Loading…
Add table
Reference in a new issue