change: make query id to uuid
This commit is contained in:
parent
c0a0365406
commit
df231d6462
12 changed files with 119 additions and 20 deletions
|
@ -212,7 +212,7 @@ export default abstract class BackupHelper {
|
|||
case "calendar":
|
||||
return await this.getCalendar();
|
||||
case "query":
|
||||
return await this.getQueryStore();
|
||||
return await this.getQueryStore(collectIds);
|
||||
case "template":
|
||||
return await this.getTemplate();
|
||||
case "user":
|
||||
|
@ -348,7 +348,7 @@ export default abstract class BackupHelper {
|
|||
"member.birthdate",
|
||||
"member.internalId",
|
||||
])
|
||||
.addSelect(["recipientsByQuery.title", "recipientsByQuery.query"])
|
||||
.addSelect([...(collectIds ? ["query.id"] : []), "recipientsByQuery.title", "recipientsByQuery.query"])
|
||||
.getMany()
|
||||
.then((res: any) =>
|
||||
res.map((n: any) => ({
|
||||
|
@ -393,8 +393,8 @@ export default abstract class BackupHelper {
|
|||
.getMany(),
|
||||
};
|
||||
}
|
||||
private static async getQueryStore(): Promise<Array<any>> {
|
||||
return await dataSource.getRepository("query").find({ select: { title: true, query: true } });
|
||||
private static async getQueryStore(collectIds: boolean): Promise<Array<any>> {
|
||||
return await dataSource.getRepository("query").find({ select: { id: collectIds, title: true, query: true } });
|
||||
}
|
||||
private static async getTemplate(): Promise<{ [key: string]: Array<any> }> {
|
||||
return {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue