Skip to content

Commit

Permalink
[backend] use camel case
Browse files Browse the repository at this point in the history
  • Loading branch information
marieflorescontact committed Dec 13, 2024
1 parent b351c16 commit c7f1c78
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion opencti-platform/opencti-graphql/src/database/redis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@ export const buildStixUpdateEvent = (user: AuthUser, previousStix: StixCoreObjec
context: {
patch,
reverse_patch: previousPatch,
relatedRestrictions: opts.relatedRestrictions,
related_restrictions: opts.related_restrictions,
}
};
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ export const buildHistoryElementsFromEvents = async (context:AuthContext, events
.filter((o) => isNotEmptyField(o)) as string[];
eventMarkingRefs.push(...previousMarkingRefs);
// Get related restrictions (e.g. markings of added objects in a container)
if (updateEvent.context.relatedRestrictions) {
const relatedMarkings = updateEvent.context.relatedRestrictions.markings ?? [];
if (updateEvent.context.related_restrictions) {
const relatedMarkings = updateEvent.context.related_restrictions.markings ?? [];
eventMarkingRefs.push(...relatedMarkings);
}
}
Expand Down
4 changes: 2 additions & 2 deletions opencti-platform/opencti-graphql/src/types/event.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ interface CreateEventOpts extends EventOpts {

interface UpdateEventOpts extends EventOpts {
commit?: CommitContext | undefined;
relatedRestrictions?: { markings: string[] };
related_restrictions?: { markings: string[] };
}

interface RelationCreation {
Expand Down Expand Up @@ -53,7 +53,7 @@ interface UpdateEvent extends StreamDataEvent {
context: {
patch: Array<Operation>;
reverse_patch: Array<Operation>;
relatedRestrictions?: { markings: string[] };
related_restrictions?: { markings: string[] };
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ const eventWithRelatedRestriction = {
path: '/object_refs/7'
}
],
relatedRestrictions: {
related_restrictions: {
markings: [
'4584aeee-10b6-47a7-808e-603440642285'
]
Expand Down

0 comments on commit c7f1c78

Please sign in to comment.