We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
There is a random createPasswordResetToken called inside reset-tokens.ts file. Is this a typo error? @webdevcody
reset-tokens.ts
createPasswordResetToken; import { TOKEN_LENGTH, TOKEN_TTL } from "@/app-config"; import { generateRandomToken } from "@/data-access/utils"; import { database } from "@/db"; import { resetTokens } from "@/db/schema"; import { UserId } from "@/use-cases/types"; import { eq } from "drizzle-orm"; export async function createPasswordResetToken(userId: UserId) { const token = await generateRandomToken(TOKEN_LENGTH); const tokenExpiresAt = new Date(Date.now() + TOKEN_TTL); await database .insert(resetTokens) .values({ userId, token, tokenExpiresAt, }) .onConflictDoUpdate({ target: resetTokens.userId, set: { token, tokenExpiresAt, }, }); return token; }
schema.ts line 212 -> 223 duplicated properties tokenExpiresAt: timestamp("tokenExpiresAt", { mode: "date" }).notNull(),
schema.ts
tokenExpiresAt: timestamp("tokenExpiresAt", { mode: "date" }).notNull(),
export const invites = pgTable("gf_invites", { id: serial("id").primaryKey(), token: text("token") .notNull() .default(sql`gen_random_uuid()`) .unique(), tokenExpiresAt: timestamp("tokenExpiresAt", { mode: "date" }), groupId: serial("groupId") .notNull() .references(() => groups.id, { onDelete: "cascade" }), tokenExpiresAt: timestamp("tokenExpiresAt", { mode: "date" }).notNull(), });
The text was updated successfully, but these errors were encountered:
No branches or pull requests
There is a random createPasswordResetToken called inside
reset-tokens.ts
file. Is this a typo error? @webdevcodyschema.ts
line 212 -> 223duplicated properties
tokenExpiresAt: timestamp("tokenExpiresAt", { mode: "date" }).notNull(),
The text was updated successfully, but these errors were encountered: