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
27 lines
596 B
TypeScript
27 lines
596 B
TypeScript
import { TRPCError } from "@trpc/server"
|
|
import { setTimeout } from "timers/promises"
|
|
import { z } from "zod"
|
|
|
|
import { protectedProcedure } from "@/server/trpc"
|
|
|
|
const outputSchema = z.object({
|
|
// unlinked: z.boolean(),
|
|
})
|
|
|
|
export const unlinkAccount = protectedProcedure
|
|
.output(outputSchema)
|
|
.mutation(async function ({ ctx, input }) {
|
|
console.log("[SAS] unlink account")
|
|
await setTimeout(1000)
|
|
//TODO: Call actual API here
|
|
|
|
throw new TRPCError({
|
|
message: "Unable to unlink account",
|
|
code: "BAD_REQUEST",
|
|
})
|
|
|
|
return {
|
|
unlinked: true,
|
|
}
|
|
})
|