mirror of
https://github.com/woodchen-ink/Q58Connect.git
synced 2025-07-18 14:01:55 +08:00
refactor: Improve AccessToken creation method with explicit data handling
This commit is contained in:
parent
ecc02928ed
commit
402295d908
@ -3,9 +3,11 @@ import { AccessToken } from "@prisma/client";
|
|||||||
import { prisma } from "@/lib/prisma";
|
import { prisma } from "@/lib/prisma";
|
||||||
|
|
||||||
export async function createAccessToken(
|
export async function createAccessToken(
|
||||||
data: Omit<AccessToken, "id">,
|
data: Omit<AccessToken, "id" | "createdAt" | "updatedAt" | "error">,
|
||||||
): Promise<AccessToken> {
|
): Promise<AccessToken> {
|
||||||
return prisma.accessToken.create({ data });
|
return prisma.accessToken.create({
|
||||||
|
data,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function getAccessTokenByToken(token: string) {
|
export async function getAccessTokenByToken(token: string) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user