Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: 초대장 nanoid 생성 로직 수정 #76

Merged
merged 2 commits into from
Aug 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/lib/db/schema/invitations.query.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
"use server";

import { count, eq, getTableColumns } from "drizzle-orm";
import { nanoid } from "nanoid";
import { revalidatePath } from "next/cache";
import { getAuth } from "~/lib/auth/utils";
import { db } from "~/lib/db";
Expand All @@ -11,6 +10,13 @@ import {
invitations,
} from "~/lib/db/schema/invitations";

import { customAlphabet } from "nanoid";
Copy link
Collaborator

@bepyan bepyan Aug 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이거 위에 선언 되어 있어서 제거 해줘야합니다.

위에 import { nanoid } from "nanoid";이걸 지워야 합니당

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

반영완료했습니닷

fix: import 제거


const alphabet = "0123456789abcdefghijklmnopqrstuvwxyz";
const nanoid = customAlphabet(alphabet, 5);

// TODO 중복 방지 로직 추가되어야 함

type CreateInvitationParams = Omit<
InvitationInsert,
"id" | "userId" | "eventUrl" | "createdAt" | "updatedAt"
Expand Down
Loading