mirror of
https://github.com/OneUptime/oneuptime
synced 2024-11-21 14:49:07 +00:00
fix array save
This commit is contained in:
parent
842b0664c7
commit
81e4b4435c
@ -234,19 +234,19 @@ export default class StatementGenerator<TBaseModel extends AnalyticsBaseModel> {
|
||||
}
|
||||
|
||||
if (column.type === TableColumnType.ArrayNumber) {
|
||||
value = `(${(value as Array<number>)
|
||||
value = `[${(value as Array<number>)
|
||||
.map((v: number) => {
|
||||
return v;
|
||||
})
|
||||
.join(', ')})`;
|
||||
.join(', ')}]`;
|
||||
}
|
||||
|
||||
if (column.type === TableColumnType.ArrayText) {
|
||||
value = `(${(value as Array<string>)
|
||||
value = `[${(value as Array<string>)
|
||||
.map((v: string) => {
|
||||
return `'${v}'`;
|
||||
})
|
||||
.join(', ')})`;
|
||||
.join(', ')}]`;
|
||||
}
|
||||
|
||||
if(column.type === TableColumnType.JSON) {
|
||||
|
@ -292,6 +292,7 @@ router.post(
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
await MetricSumService.createMany({
|
||||
items: dbMetricsSum,
|
||||
props: {
|
||||
|
Loading…
Reference in New Issue
Block a user