award badges
This commit is contained in:
@@ -86,7 +86,7 @@ const BadgeShowcase = ({ playerId }: BadgeShowcaseProps) => {
|
||||
}
|
||||
|
||||
return (
|
||||
<Box mb="lg">
|
||||
<Box px="md" mb="lg">
|
||||
<Card
|
||||
withBorder
|
||||
radius="md"
|
||||
|
||||
@@ -22,3 +22,13 @@ export const getAllBadges = createServerFn()
|
||||
.handler(async () =>
|
||||
toServerResult(() => pbAdmin.listBadges())
|
||||
);
|
||||
|
||||
export const awardManualBadge = createServerFn()
|
||||
.inputValidator(z.object({
|
||||
playerId: z.string(),
|
||||
badgeId: z.string(),
|
||||
}))
|
||||
.middleware([superTokensAdminFunctionMiddleware])
|
||||
.handler(async ({ data }) =>
|
||||
toServerResult(() => pbAdmin.awardManualBadge(data.playerId, data.badgeId))
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user