hermes-web/lib/current-user.ts

11 lines
194 B
TypeScript
Raw Normal View History

2023-12-30 10:56:40 +00:00
import { db } from "@/lib/db"
2024-01-04 08:56:24 +00:00
export const currentUser = async(id: string) => {
2023-12-30 10:56:40 +00:00
const user = await db.user.findUnique({
where: {
2024-01-04 08:56:24 +00:00
id
2023-12-30 10:56:40 +00:00
}
});
return user;
}