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