Feature/hardcoded mypages links * feat: wip use hardcoded links * Merge branch 'master' of bitbucket.org:scandic-swap/web into feature/hardcoded-mypages-links * feat: use hardcoded links for my pages to support dynamic links * cleanup * code fixes * refactor: restructure MyPagesMobileDropdown component for improved readability * use util timeout function Approved-by: Christian Andolf Approved-by: Linus Flood
22 lines
528 B
TypeScript
22 lines
528 B
TypeScript
import { TRPCError } from "@trpc/server"
|
|
import { z } from "zod"
|
|
|
|
import { protectedProcedure } from "@/server/trpc"
|
|
|
|
import { timeout } from "@/utils/timeout"
|
|
|
|
const outputSchema = z.object({})
|
|
|
|
export const performLevelUpgrade = protectedProcedure
|
|
.output(outputSchema)
|
|
.mutation(async function ({ ctx, input }) {
|
|
console.log("[SAS] perform upgrade")
|
|
await timeout(1000)
|
|
//TODO: Call actual API here
|
|
|
|
throw new TRPCError({
|
|
message: "Unable to perform ugprade",
|
|
code: "BAD_REQUEST",
|
|
})
|
|
})
|