mirror of
https://github.com/lukevella/rallly.git
synced 2025-06-16 17:41:50 +02:00
👁️ Make calls to user api public
This commit is contained in:
parent
76c501f45f
commit
77dc11eaf7
1 changed files with 3 additions and 3 deletions
|
@ -1,10 +1,10 @@
|
||||||
import { prisma } from "@rallly/database";
|
import { prisma } from "@rallly/database";
|
||||||
import { z } from "zod";
|
import { z } from "zod";
|
||||||
|
|
||||||
import { privateProcedure, router } from "../trpc";
|
import { possiblyPublicProcedure, privateProcedure, router } from "../trpc";
|
||||||
|
|
||||||
export const user = router({
|
export const user = router({
|
||||||
getBilling: privateProcedure.query(async ({ ctx }) => {
|
getBilling: possiblyPublicProcedure.query(async ({ ctx }) => {
|
||||||
return await prisma.userPaymentData.findUnique({
|
return await prisma.userPaymentData.findUnique({
|
||||||
select: {
|
select: {
|
||||||
subscriptionId: true,
|
subscriptionId: true,
|
||||||
|
@ -19,7 +19,7 @@ export const user = router({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}),
|
}),
|
||||||
subscription: privateProcedure.query(async ({ ctx }) => {
|
subscription: possiblyPublicProcedure.query(async ({ ctx }) => {
|
||||||
const user = await prisma.user.findUnique({
|
const user = await prisma.user.findUnique({
|
||||||
where: {
|
where: {
|
||||||
id: ctx.user.id,
|
id: ctx.user.id,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue