fix: Unpublished screens (#10453)
* Implementation * Changes and e2e * Reverting launch.json * Reverting org create handler * Reverting yarn.lock * DRYness and nitpicks * Default org domain to undefined * Applying zomars suggestion * Suggestions * Fixing seed and type in suggestion * Fixing types --------- Co-authored-by: zomars <[email protected]>
This commit is contained in:
1 parent
4435451e9b
commit
4a6dc50909
29 files changed
+503
-161
No files matched your search
@@ -28,7 +28,7 @@ export const createHandler = async ({ ctx, input }: CreateOptions) => {
|
||||
where: {
|
||||
slug: slug,
|
||||
// If this is under an org, check that the team doesn't already exist
|
||||
...(isOrgChildTeam && { parentId: user.organizationId }),
|
||||
parentId: isOrgChildTeam ? user.organizationId : null,
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ type GetOptions = {
|
||||
};
|
||||
|
||||
export const getHandler = async ({ ctx, input }: GetOptions) => {
|
||||
const team = await getTeamWithMembers(input.teamId, undefined, ctx.user.id);
|
||||
const team = await getTeamWithMembers({ id: input.teamId, userId: ctx.user.id });
|
||||
|
||||
if (!team) {
|
||||
throw new TRPCError({ code: "NOT_FOUND", message: "Team not found." });
|
||||
|
||||
Reference in new issue
Block a user