Skip to content

Commit

Permalink
fix: add document to schema update[3724] (#3986)
Browse files Browse the repository at this point in the history
Co-authored-by: Ihar <[email protected]>
  • Loading branch information
ihar-tsykala and Ihar authored Aug 20, 2024
1 parent 90248b0 commit 9707304
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion api-gateway/src/constants/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export const UN_REQUIRED_PROPS = {
SYSTEM: 'system',
// TOPIC_ID: 'topicId',
UPDATE_DATE: 'updateDate',
UUID: 'uuid',
// UUID: 'uuid',
// VERSION: 'version',
// _ID: '_id',
};
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export class SchemaFormDialog {
}

onSave() {
this.dialogRef.close(this.dataForm?.value);
this.dialogRef.close({exampleDate: this.dataForm?.value, currentSchema: this.schema});
}

getSubSchemes() {
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/app/views/schemas/schemas.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -956,10 +956,10 @@ export class SchemaConfigComponent implements OnInit {
disableClose: true,
data: { schema, example, category: this.getCategory() },
});
dialogRef.afterClosed().subscribe(async (exampleDate: any) => {
if (exampleDate) {
dialogRef.afterClosed().subscribe(async ({ exampleDate, currentSchema }: { exampleDate: any, currentSchema: Schema }) => {
if (exampleDate && currentSchema) {
schema.setExample(exampleDate);
this.updateSchema(schema.id, schema);
this.updateSchema(currentSchema.id, currentSchema);
}
});
}
Expand Down

0 comments on commit 9707304

Please sign in to comment.