fix(SW-360): service procedure update + contentyp layout fix
This commit is contained in:
@@ -5,7 +5,7 @@ import { z } from "zod"
|
||||
|
||||
import { signupVerify } from "@/constants/routes/signup"
|
||||
import * as api from "@/lib/api"
|
||||
import { profileServiceServerActionProcedure } from "@/server/trpc"
|
||||
import { serviceServerActionProcedure } from "@/server/trpc"
|
||||
|
||||
import { registerSchema } from "@/components/Forms/Register/schema"
|
||||
import { passwordValidator } from "@/utils/passwordValidator"
|
||||
@@ -28,7 +28,7 @@ const registerUserPayload = z.object({
|
||||
password: passwordValidator("Password is required"),
|
||||
})
|
||||
|
||||
export const registerUser = profileServiceServerActionProcedure
|
||||
export const registerUser = serviceServerActionProcedure
|
||||
.input(registerSchema)
|
||||
.mutation(async function ({ ctx, input }) {
|
||||
const payload = {
|
||||
|
||||
@@ -5,6 +5,5 @@
|
||||
gap: var(--Spacing-x3);
|
||||
grid-template-rows: auto 1fr;
|
||||
position: relative;
|
||||
max-width: var(--max-width);
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
@@ -140,9 +140,9 @@ export const serverActionProcedure = t.procedure.experimental_caller(
|
||||
})
|
||||
)
|
||||
|
||||
export const profileServiceServerActionProcedure = serverActionProcedure.use(
|
||||
export const serviceServerActionProcedure = serverActionProcedure.use(
|
||||
async (opts) => {
|
||||
const { access_token } = await fetchServiceToken(["profile"])
|
||||
const { access_token } = await getServiceToken()
|
||||
if (!access_token) {
|
||||
throw internalServerError("Failed to obtain service token")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user