Skip to content

Commit

Permalink
Make import more readable
Browse files Browse the repository at this point in the history
  • Loading branch information
ansgarprause committed Apr 16, 2023
1 parent f2fbfaa commit 01c90fe
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/handler.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Handler, serve } from "https://deno.land/std@0.182.0/http/server.ts";
import { generate } from "https://deno.land/std@0.182.0/uuid/v5.ts";
import * as v5 from "https://deno.land/std@0.182.0/uuid/v5.ts";
import { z } from "https://deno.land/x/zod@v3.20.5/index.ts";
import ical, { ICalEventData } from "https://esm.sh/v108/ical-generator@3.6.1";
import {
Expand Down Expand Up @@ -71,7 +71,10 @@ const handle: Handler = async (request) => {
: undefined);

const eventConfig: ICalEventData = {
id: await generate(NAMESPACE_URL_UUID, new TextEncoder().encode(url)),
id: await v5.generate(
NAMESPACE_URL_UUID,
new TextEncoder().encode(url)
),
summary: event.name || event.post?.topic?.title || "Unnamed event",
start,
...(event.ends_at
Expand Down

0 comments on commit 01c90fe

Please sign in to comment.