@@ -26,7 +26,7 @@ const requestBodySchema = z.object({
26
26
locationLink : z . optional ( z . string ( ) . url ( ) ) ,
27
27
repeats : z . optional ( z . enum ( repeatOptions ) ) ,
28
28
host : z . enum ( OrganizationList ) ,
29
- featured : z . boolean ( ) . default ( false )
29
+ featured : z . boolean ( ) . default ( false ) ,
30
30
} ) ;
31
31
const requestJsonSchema = zodToJsonSchema ( requestBodySchema ) ;
32
32
type EventPostRequest = z . infer < typeof requestBodySchema > ;
@@ -60,7 +60,9 @@ const eventsPlugin: FastifyPluginAsync = async (fastify, _options) => {
60
60
} ,
61
61
async ( request , reply ) => {
62
62
try {
63
- const entryUUID = ( ( request . params ) as any ) . id || randomUUID ( ) . toString ( ) ;
63
+ const entryUUID =
64
+ ( request . params as Record < string , string > ) . id ||
65
+ randomUUID ( ) . toString ( ) ;
64
66
await dynamoClient . send (
65
67
new PutItemCommand ( {
66
68
TableName : config . DYNAMO_TABLE_NAME ,
@@ -97,7 +99,7 @@ const eventsPlugin: FastifyPluginAsync = async (fastify, _options) => {
97
99
const response = await dynamoClient . send (
98
100
new ScanCommand ( { TableName : config . DYNAMO_TABLE_NAME } ) ,
99
101
) ;
100
- const items = response . Items ?. map ( item => unmarshall ( item ) )
102
+ const items = response . Items ?. map ( ( item ) => unmarshall ( item ) ) ;
101
103
reply . send ( getResponseBodySchema . parse ( items ) ) ;
102
104
} catch ( e : unknown ) {
103
105
if ( e instanceof Error ) {
0 commit comments