mirror of
https://github.com/documenso/documenso.git
synced 2025-11-13 00:03:33 +10:00
15 lines
405 B
TypeScript
15 lines
405 B
TypeScript
import { prisma } from '@documenso/prisma';
|
|
import type { UserProfile } from '@documenso/prisma/client';
|
|
|
|
export interface GetPublicProfileByURLOptions {
|
|
profileURL: UserProfile['profileURL'];
|
|
}
|
|
|
|
export const getPublicProfileByURL = async ({ profileURL }: GetPublicProfileByURLOptions) => {
|
|
return await prisma.userProfile.findFirstOrThrow({
|
|
where: {
|
|
profileURL: profileURL,
|
|
},
|
|
});
|
|
};
|