From 197a30225ec576e8d07cafe53e7268af89061fdf Mon Sep 17 00:00:00 2001 From: Chidi Ekuma Date: Fri, 15 Dec 2023 09:53:09 +0000 Subject: [PATCH] Adds optional param to TeachingEventAddAttendee - Adds `Channel_id` to the model --- .../Models/GetIntoTeaching/TeachingEventAddAttendee.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/GetIntoTeachingApi/Models/GetIntoTeaching/TeachingEventAddAttendee.cs b/GetIntoTeachingApi/Models/GetIntoTeaching/TeachingEventAddAttendee.cs index 58d913c6e..cd4a2b69e 100644 --- a/GetIntoTeachingApi/Models/GetIntoTeaching/TeachingEventAddAttendee.cs +++ b/GetIntoTeachingApi/Models/GetIntoTeaching/TeachingEventAddAttendee.cs @@ -15,6 +15,10 @@ public class TeachingEventAddAttendee [SwaggerSchema(WriteOnly = true)] public Guid? EventId { get; set; } + + [SwaggerSchema(WriteOnly = true)] + public int? ChannelId { get; set; } + [SwaggerSchema(WriteOnly = true)] public Guid? AcceptedPolicyId { get; set; } public Guid? PreferredTeachingSubjectId { get; set; } @@ -136,7 +140,7 @@ private void ConfigureChannel(Candidate candidate) { if (CandidateId == null) { - candidate.ChannelId = (int?)Candidate.Channel.Event; + candidate.ChannelId = ChannelId ?? (int?)Candidate.Channel.Event; } }