mirror of
https://github.com/Dokploy/dokploy.git
synced 2026-07-23 06:45:27 +02:00
refactor: update organization context in API routers
This commit is contained in:
@@ -5,12 +5,12 @@ import {
|
||||
organization,
|
||||
users_temp,
|
||||
} from "@/server/db/schema";
|
||||
import { IS_CLOUD, auth } from "@dokploy/server/index";
|
||||
import { TRPCError } from "@trpc/server";
|
||||
import { and, desc, eq, exists } from "drizzle-orm";
|
||||
import { nanoid } from "nanoid";
|
||||
import { z } from "zod";
|
||||
import { adminProcedure, createTRPCRouter, protectedProcedure } from "../trpc";
|
||||
import { auth, IS_CLOUD } from "@dokploy/server/index";
|
||||
export const organizationRouter = createTRPCRouter({
|
||||
create: protectedProcedure
|
||||
.input(
|
||||
@@ -148,10 +148,9 @@ export const organizationRouter = createTRPCRouter({
|
||||
acceptInvitation: adminProcedure
|
||||
.input(z.object({ invitationId: z.string() }))
|
||||
.mutation(async ({ ctx, input }) => {
|
||||
const result = await auth.api.acceptInvitation({
|
||||
invitationId: input.invitationId,
|
||||
});
|
||||
|
||||
return result;
|
||||
// const result = await auth.api.acceptInvitation({
|
||||
// invitationId: input.invitationId,
|
||||
// });
|
||||
// return result;
|
||||
}),
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user