hermes-web/lib/current-user.ts

11 lines
194 B
TypeScript
Raw Permalink Normal View History

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