lobe-chat

Форк
0
26 строк · 807.0 Байт
1
/**
2
 * This is your entry point to setup the root configuration for tRPC on the server.
3
 * - `initTRPC` should only be used once per app.
4
 * - We export only the functionality that we use so we can enforce which base procedures should be used
5
 *
6
 * Learn how to create protected base procedures and other things below:
7
 * @link https://trpc.io/docs/v11/router
8
 * @link https://trpc.io/docs/v11/procedures
9
 */
10
import { initTRPC } from '@trpc/server';
11
import superjson from 'superjson';
12

13
import type { Context } from '@/server/context';
14

15
export const trpc = initTRPC.context<Context>().create({
16
  /**
17
   * @link https://trpc.io/docs/v11/error-formatting
18
   */
19
  errorFormatter({ shape }) {
20
    return shape;
21
  },
22
  /**
23
   * @link https://trpc.io/docs/v11/data-transformers
24
   */
25
  transformer: superjson,
26
});
27

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.