Use LinksMetadata right type for Links fields (#6380)
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
import { ObjectType, Field, registerEnumType } from '@nestjs/graphql';
|
||||
import { Field, ObjectType, registerEnumType } from '@nestjs/graphql';
|
||||
|
||||
import { UUIDScalarType } from 'src/engine/api/graphql/workspace-schema-builder/graphql-types/scalars';
|
||||
import { TimelineCalendarEventParticipant } from 'src/engine/core-modules/calendar/dtos/timeline-calendar-event-participant.dto';
|
||||
@ -10,7 +10,7 @@ registerEnumType(CalendarChannelVisibility, {
|
||||
});
|
||||
|
||||
@ObjectType('LinkMetadata')
|
||||
export class LinkMetadata {
|
||||
class LinkMetadata {
|
||||
@Field()
|
||||
label: string;
|
||||
|
||||
@ -18,6 +18,18 @@ export class LinkMetadata {
|
||||
url: string;
|
||||
}
|
||||
|
||||
@ObjectType('LinksMetadata')
|
||||
export class LinksMetadata {
|
||||
@Field()
|
||||
primaryLinkLabel: string;
|
||||
|
||||
@Field()
|
||||
primaryLinkUrl: string;
|
||||
|
||||
@Field(() => [LinkMetadata], { nullable: true })
|
||||
secondaryLinks: object | null;
|
||||
}
|
||||
|
||||
@ObjectType('TimelineCalendarEvent')
|
||||
export class TimelineCalendarEvent {
|
||||
@Field(() => UUIDScalarType)
|
||||
@ -47,8 +59,8 @@ export class TimelineCalendarEvent {
|
||||
@Field()
|
||||
conferenceSolution: string;
|
||||
|
||||
@Field(() => LinkMetadata)
|
||||
conferenceLink: LinkMetadata;
|
||||
@Field(() => LinksMetadata)
|
||||
conferenceLink: LinksMetadata;
|
||||
|
||||
@Field(() => [TimelineCalendarEventParticipant])
|
||||
participants: TimelineCalendarEventParticipant[];
|
||||
|
||||
Reference in New Issue
Block a user