remove versions from serialized apps

This commit is contained in:
Ruben Fiszel
2023-02-22 01:13:42 +01:00
parent e553b3e2fd
commit 81bb580222
2 changed files with 3 additions and 7 deletions
+1 -1
View File
@@ -1111,7 +1111,7 @@ where
.as_object()
.map(|obj| {
let mut obj = obj.clone();
for key in ["workspace_id", "path", "name"] {
for key in ["workspace_id", "path", "name", "versions"] {
if obj.contains_key(key) {
obj.remove(key);
}
+2 -6
View File
@@ -1,4 +1,4 @@
import { Any, model, property, array } from "./decoverto.ts";
import { Any, model, property } from "./decoverto.ts";
import {
AppService,
AppWithLastVersion,
@@ -16,14 +16,11 @@ export class AppFile implements Resource, PushDiffs {
summary: string;
@property(Any)
policy: Policy;
@property(array(() => Number))
versions: number[];
constructor(value: string, summary: string, policy: Policy, versions: number[]) {
constructor(value: string, summary: string, policy: Policy) {
this.value = value;
this.summary = summary;
this.policy = policy;
this.versions = versions;
}
async pushDiffs(
workspace: string,
@@ -41,7 +38,6 @@ export class AppFile implements Resource, PushDiffs {
summary?: string | undefined;
value?: any;
policy?: Policy | undefined;
versions?: number[] | undefined;
} = {};
for (const diff of diffs) {
if (