Feature/sas mypages * feat: Add SAS partner page under my pages * fix: feature toggle SAS Partner page in my pages * add translations for SAS account page * use 'flex-start' instead of 'start' * fix: flatten css * fix: don't use <SectionContainer /> on linkedAccounts page
26 lines
591 B
TypeScript
26 lines
591 B
TypeScript
import { setTimeout } from "timers/promises"
|
|
import { z } from "zod"
|
|
|
|
import { protectedProcedure } from "@/server/trpc"
|
|
|
|
import { getSasToken } from "./getSasToken"
|
|
|
|
const outputSchema = z.object({
|
|
linkingState: z.enum(["linked"]),
|
|
})
|
|
|
|
export const linkAccount = protectedProcedure
|
|
.output(outputSchema)
|
|
.mutation(async function ({ ctx, input }) {
|
|
const sasAuthToken = getSasToken()
|
|
|
|
console.log("[SAS] link account")
|
|
await setTimeout(1000)
|
|
//TODO: Call actual API here
|
|
console.log("[SAS] link account done")
|
|
|
|
return {
|
|
linkingState: "linked",
|
|
}
|
|
})
|