mirror of
https://github.com/versia-pub/server.git
synced 2025-12-07 00:48:18 +01:00
fix(database): 🐛 Remove some leftover parts of pg_uuidv7
This commit is contained in:
parent
9d79543951
commit
dde085464c
|
|
@ -2,7 +2,7 @@ import { db } from "@versia/kit/db";
|
|||
import { Challenges } from "@versia/kit/tables";
|
||||
import { createChallenge } from "altcha-lib";
|
||||
import type { Challenge } from "altcha-lib/types";
|
||||
import { sql } from "drizzle-orm";
|
||||
import { randomUUIDv7 } from "bun";
|
||||
import { config } from "~/config.ts";
|
||||
|
||||
export const generateChallenge = async (
|
||||
|
|
@ -21,8 +21,7 @@ export const generateChallenge = async (
|
|||
Date.now() + config.validation.challenges.expiration * 1000,
|
||||
);
|
||||
|
||||
const uuid = (await db.execute(sql<string>`SELECT uuid_generate_v7()`))
|
||||
.rows[0].uuid_generate_v7 as string;
|
||||
const uuid = randomUUIDv7();
|
||||
|
||||
const challenge = await createChallenge({
|
||||
hmacKey: config.validation.challenges.key,
|
||||
|
|
|
|||
Loading…
Reference in a new issue