@@ -107,12 +107,16 @@ const membershipPlugin: FastifyPluginAsync = async (fastify, _options) => {
107
107
"application/json" : {
108
108
schema : z
109
109
. object ( {
110
+ givenName : z . string ( ) . min ( 1 ) ,
111
+ surname : z . string ( ) . min ( 1 ) ,
110
112
netId : illinoisNetId ,
111
113
list : z . optional ( z . string ( ) . min ( 1 ) ) ,
112
114
isPaidMember : z . boolean ( ) ,
113
115
} )
114
116
. meta ( {
115
117
example : {
118
+ givenName : "Robert" ,
119
+ surname : "Jones" ,
116
120
netId : "rjjones" ,
117
121
isPaidMember : false ,
118
122
} ,
@@ -148,6 +152,8 @@ const membershipPlugin: FastifyPluginAsync = async (fastify, _options) => {
148
152
} ) ;
149
153
if ( result ) {
150
154
return reply . header ( "X-ACM-Data-Source" , "cache" ) . send ( {
155
+ givenName,
156
+ surname,
151
157
netId,
152
158
list : list === "acmpaid" ? undefined : list ,
153
159
isPaidMember : result . isMember ,
@@ -167,6 +173,8 @@ const membershipPlugin: FastifyPluginAsync = async (fastify, _options) => {
167
173
logger : request . log ,
168
174
} ) ;
169
175
return reply . header ( "X-ACM-Data-Source" , "dynamo" ) . send ( {
176
+ givenName,
177
+ surname,
170
178
netId,
171
179
list,
172
180
isPaidMember : isMember ,
@@ -186,7 +194,7 @@ const membershipPlugin: FastifyPluginAsync = async (fastify, _options) => {
186
194
} ) ;
187
195
return reply
188
196
. header ( "X-ACM-Data-Source" , "dynamo" )
189
- . send ( { netId, isPaidMember : true } ) ;
197
+ . send ( { givenName , surname , netId, isPaidMember : true } ) ;
190
198
}
191
199
const entraIdToken = await getEntraIdToken ( {
192
200
clients : await getAuthorizedClients ( ) ,
@@ -210,7 +218,7 @@ const membershipPlugin: FastifyPluginAsync = async (fastify, _options) => {
210
218
} ) ;
211
219
reply
212
220
. header ( "X-ACM-Data-Source" , "aad" )
213
- . send ( { netId, isPaidMember : true } ) ;
221
+ . send ( { givenName , surname , netId, isPaidMember : true } ) ;
214
222
await setPaidMembershipInTable ( netId , fastify . dynamoClient ) ;
215
223
return ;
216
224
}
@@ -223,7 +231,7 @@ const membershipPlugin: FastifyPluginAsync = async (fastify, _options) => {
223
231
} ) ;
224
232
return reply
225
233
. header ( "X-ACM-Data-Source" , "aad" )
226
- . send ( { netId, isPaidMember : false } ) ;
234
+ . send ( { givenName , surname , netId, isPaidMember : false } ) ;
227
235
} ,
228
236
) ;
229
237
fastify . withTypeProvider < FastifyZodOpenApiTypeProvider > ( ) . get (
0 commit comments