@@ -107,12 +107,16 @@ const membershipPlugin: FastifyPluginAsync = async (fastify, _options) => {
107107 "application/json" : {
108108 schema : z
109109 . object ( {
110+ givenName : z . string ( ) . min ( 1 ) ,
111+ surname : z . string ( ) . min ( 1 ) ,
110112 netId : illinoisNetId ,
111113 list : z . optional ( z . string ( ) . min ( 1 ) ) ,
112114 isPaidMember : z . boolean ( ) ,
113115 } )
114116 . meta ( {
115117 example : {
118+ givenName : "Robert" ,
119+ surname : "Jones" ,
116120 netId : "rjjones" ,
117121 isPaidMember : false ,
118122 } ,
@@ -148,6 +152,8 @@ const membershipPlugin: FastifyPluginAsync = async (fastify, _options) => {
148152 } ) ;
149153 if ( result ) {
150154 return reply . header ( "X-ACM-Data-Source" , "cache" ) . send ( {
155+ givenName,
156+ surname,
151157 netId,
152158 list : list === "acmpaid" ? undefined : list ,
153159 isPaidMember : result . isMember ,
@@ -167,6 +173,8 @@ const membershipPlugin: FastifyPluginAsync = async (fastify, _options) => {
167173 logger : request . log ,
168174 } ) ;
169175 return reply . header ( "X-ACM-Data-Source" , "dynamo" ) . send ( {
176+ givenName,
177+ surname,
170178 netId,
171179 list,
172180 isPaidMember : isMember ,
@@ -186,7 +194,7 @@ const membershipPlugin: FastifyPluginAsync = async (fastify, _options) => {
186194 } ) ;
187195 return reply
188196 . header ( "X-ACM-Data-Source" , "dynamo" )
189- . send ( { netId, isPaidMember : true } ) ;
197+ . send ( { givenName , surname , netId, isPaidMember : true } ) ;
190198 }
191199 const entraIdToken = await getEntraIdToken ( {
192200 clients : await getAuthorizedClients ( ) ,
@@ -210,7 +218,7 @@ const membershipPlugin: FastifyPluginAsync = async (fastify, _options) => {
210218 } ) ;
211219 reply
212220 . header ( "X-ACM-Data-Source" , "aad" )
213- . send ( { netId, isPaidMember : true } ) ;
221+ . send ( { givenName , surname , netId, isPaidMember : true } ) ;
214222 await setPaidMembershipInTable ( netId , fastify . dynamoClient ) ;
215223 return ;
216224 }
@@ -223,7 +231,7 @@ const membershipPlugin: FastifyPluginAsync = async (fastify, _options) => {
223231 } ) ;
224232 return reply
225233 . header ( "X-ACM-Data-Source" , "aad" )
226- . send ( { netId, isPaidMember : false } ) ;
234+ . send ( { givenName , surname , netId, isPaidMember : false } ) ;
227235 } ,
228236 ) ;
229237 fastify . withTypeProvider < FastifyZodOpenApiTypeProvider > ( ) . get (
0 commit comments