last I hope
This commit is contained in:
@@ -1,8 +1,5 @@
|
|||||||
import { toServerResult } from "@/lib/tanstack-query/utils/to-server-result";
|
import { toServerResult } from "@/lib/tanstack-query/utils/to-server-result";
|
||||||
import {
|
import { superTokensAdminFunctionMiddleware, superTokensFunctionMiddleware } from "@/utils/supertokens";
|
||||||
superTokensAdminFunctionMiddleware,
|
|
||||||
superTokensFunctionMiddleware,
|
|
||||||
} from "@/utils/supertokens";
|
|
||||||
import { createServerFn } from "@tanstack/react-start";
|
import { createServerFn } from "@tanstack/react-start";
|
||||||
import { pbAdmin } from "@/lib/pocketbase/client";
|
import { pbAdmin } from "@/lib/pocketbase/client";
|
||||||
import { z } from "zod";
|
import { z } from "zod";
|
||||||
@@ -23,7 +20,7 @@ export const migrateBadgeProgress = createServerFn()
|
|||||||
export const getAllBadges = createServerFn()
|
export const getAllBadges = createServerFn()
|
||||||
.middleware([superTokensFunctionMiddleware])
|
.middleware([superTokensFunctionMiddleware])
|
||||||
.handler(async () =>
|
.handler(async () =>
|
||||||
toServerResult(() => pbAdmin.listBadges())
|
toServerResult(() => pbAdmin.listBadges())
|
||||||
);
|
);
|
||||||
|
|
||||||
export const getAllEarnedBadges = createServerFn()
|
export const getAllEarnedBadges = createServerFn()
|
||||||
|
|||||||
Reference in New Issue
Block a user