Skip to content

Commit 8f8e483

Browse files
committed
fix testing
1 parent b728455 commit 8f8e483

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/errors/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ export class DatabaseInsertError extends BaseError<"DatabaseInsertError"> {
9393
}
9494
}
9595

96-
9796
export class DatabaseFetchError extends BaseError<"DatabaseFetchError"> {
9897
constructor({ message }: { message: string }) {
9998
super({

src/routes/events.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const requestBodySchema = z.object({
2626
locationLink: z.optional(z.string().url()),
2727
repeats: z.optional(z.enum(repeatOptions)),
2828
host: z.enum(OrganizationList),
29-
featured: z.boolean().default(false)
29+
featured: z.boolean().default(false),
3030
});
3131
const requestJsonSchema = zodToJsonSchema(requestBodySchema);
3232
type EventPostRequest = z.infer<typeof requestBodySchema>;
@@ -60,7 +60,9 @@ const eventsPlugin: FastifyPluginAsync = async (fastify, _options) => {
6060
},
6161
async (request, reply) => {
6262
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();
6466
await dynamoClient.send(
6567
new PutItemCommand({
6668
TableName: config.DYNAMO_TABLE_NAME,
@@ -97,7 +99,7 @@ const eventsPlugin: FastifyPluginAsync = async (fastify, _options) => {
9799
const response = await dynamoClient.send(
98100
new ScanCommand({ TableName: config.DYNAMO_TABLE_NAME }),
99101
);
100-
const items = response.Items?.map(item => unmarshall(item))
102+
const items = response.Items?.map((item) => unmarshall(item));
101103
reply.send(getResponseBodySchema.parse(items));
102104
} catch (e: unknown) {
103105
if (e instanceof Error) {

0 commit comments

Comments
 (0)