From 839f69a44bc4a4350bc6353f6f26b51345f3f737 Mon Sep 17 00:00:00 2001 From: bootunloader Date: Sun, 22 Sep 2024 13:30:30 +0300 Subject: [PATCH] yeah --- src/lib/trpc/routers/postdata.router.ts | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/lib/trpc/routers/postdata.router.ts b/src/lib/trpc/routers/postdata.router.ts index c542a79..1ce9c55 100644 --- a/src/lib/trpc/routers/postdata.router.ts +++ b/src/lib/trpc/routers/postdata.router.ts @@ -105,16 +105,12 @@ export const postDataApiRouter = createTRPCRouter({ .input(z.object({ yes: zPostDataFilters, cachedDataKey: z.string() })) .mutation(async ({ input }) => { if (await hasPostSession()) { + const m = + "Already posting data, please wait for the current session to finish"; return { ok: false, - detail: - "Already posting data, please wait for the current session to finish", - errors: [ - { - message: - "Already posting data, please wait for the current session to finish", - }, - ] as ServerError, + detail: m, + errors: [{ message: m }] as ServerError, }; } const date = input.yes.date;