feat: initiated public profile

Signed-off-by: Adithya Krishna <aadithya794@gmail.com>
This commit is contained in:
Adithya Krishna
2024-05-01 16:16:55 +05:30
parent 15dee5ef35
commit 69c175d38e
9 changed files with 263 additions and 6 deletions

View File

@ -88,7 +88,7 @@ export const profileRouter = router({
.input(ZUpdatePublicProfileMutationSchema)
.mutation(async ({ input, ctx }) => {
try {
const { url } = input;
const { url, bio } = input;
if (IS_BILLING_ENABLED() && url.length <= 6) {
const subscriptions = await getSubscriptionsByUserId({
@ -108,6 +108,7 @@ export const profileRouter = router({
const user = await updatePublicProfile({
userId: ctx.user.id,
url,
bio,
});
return { success: true, url: user.url };