This commit is contained in:
Andras Bacsai
2022-12-12 08:44:23 +01:00
parent f55b861849
commit c445fc0f8a
44 changed files with 3130 additions and 53 deletions

View File

@@ -0,0 +1,18 @@
// import { z } from 'zod';
import { publicProcedure, router } from '../trpc';
// import { prisma } from '../../prisma';
import { TRPCError } from '@trpc/server';
export const apiRouter = router({
getConnection: publicProcedure.query(async () => {
try {
return { success: true };
} catch (error) {
throw new TRPCError({
code: 'INTERNAL_SERVER_ERROR',
message: 'An unexpected error occurred, please try again later.',
cause: error
});
}
})
});