fix: refactor scopes for service token

This commit is contained in:
Christel Westerberg
2024-10-07 16:48:23 +02:00
committed by Pontus Dreij
parent 3c548923ff
commit ea8fdc940d
8 changed files with 128 additions and 110 deletions

View File

@@ -7,8 +7,8 @@ import { request } from "@/lib/graphql/request"
import { Context } from "@/server/context"
import { notFound } from "@/server/errors/trpc"
import {
contentStackBaseWithProfileServiceProcedure,
contentStackBaseWithProtectedProcedure,
contentStackBaseWithServiceProcedure,
router,
} from "@/server/trpc"
@@ -260,7 +260,7 @@ export const rewardQueryRouter = router({
nextCursor,
}
}),
byLevel: contentStackBaseWithProfileServiceProcedure
byLevel: contentStackBaseWithServiceProcedure
.input(rewardsByLevelInput)
.query(async function ({ input, ctx }) {
getByLevelRewardCounter.add(1)
@@ -310,7 +310,7 @@ export const rewardQueryRouter = router({
getByLevelRewardSuccessCounter.add(1)
return { level: loyaltyLevelsConfig, rewards: levelsWithRewards }
}),
all: contentStackBaseWithProfileServiceProcedure
all: contentStackBaseWithServiceProcedure
.input(rewardsAllInput)
.query(async function ({ input, ctx }) {
getAllRewardCounter.add(1)