fix: add args as keyParts for unstable_cache
This commit is contained in:
committed by
Pontus Dreij
parent
ea8fdc940d
commit
ed3acce57c
+2
-6
@@ -11,16 +11,12 @@ import {
|
||||
unauthorizedError,
|
||||
} from "./errors/trpc"
|
||||
import { type Context, createContext } from "./context"
|
||||
import { fetchServiceToken } from "./tokenManager"
|
||||
import { getServiceToken } from "./tokenManager"
|
||||
import { transformer } from "./transformer"
|
||||
import { langInput } from "./utils"
|
||||
|
||||
import type { Session } from "next-auth"
|
||||
|
||||
import {
|
||||
ServiceTokenScope,
|
||||
ServiceTokenScopeEnum,
|
||||
} from "@/types/enums/serviceToken"
|
||||
import type { Meta } from "@/types/trpc/meta"
|
||||
|
||||
const t = initTRPC
|
||||
@@ -126,7 +122,7 @@ export const safeProtectedProcedure = t.procedure.use(async function (opts) {
|
||||
})
|
||||
|
||||
export const serviceProcedure = t.procedure.use(async (opts) => {
|
||||
const { access_token } = await fetchServiceToken()
|
||||
const { access_token } = await getServiceToken()
|
||||
if (!access_token) {
|
||||
throw internalServerError(`Failed to obtain service token`)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user