🐛 Remove publicId and customDomain duplication on imported bots
This commit is contained in:
@@ -48,7 +48,7 @@ export const createCredentials = authenticatedProcedure
|
||||
},
|
||||
select: { id: true, members: true },
|
||||
})
|
||||
if (!workspace || (await isWriteWorkspaceForbidden(workspace, user)))
|
||||
if (!workspace || isWriteWorkspaceForbidden(workspace, user))
|
||||
throw new TRPCError({ code: 'NOT_FOUND', message: 'Workspace not found' })
|
||||
|
||||
const { encryptedData, iv } = await encrypt(credentials.data)
|
||||
|
||||
@@ -33,7 +33,7 @@ export const deleteCredentials = authenticatedProcedure
|
||||
},
|
||||
select: { id: true, members: true },
|
||||
})
|
||||
if (!workspace || (await isWriteWorkspaceForbidden(workspace, user)))
|
||||
if (!workspace || isWriteWorkspaceForbidden(workspace, user))
|
||||
throw new TRPCError({
|
||||
code: 'NOT_FOUND',
|
||||
message: 'Workspace not found',
|
||||
|
||||
@@ -51,7 +51,7 @@ export const listCredentials = authenticatedProcedure
|
||||
},
|
||||
},
|
||||
})
|
||||
if (!workspace || (await isReadWorkspaceFobidden(workspace, user)))
|
||||
if (!workspace || isReadWorkspaceFobidden(workspace, user))
|
||||
throw new TRPCError({ code: 'NOT_FOUND', message: 'Workspace not found' })
|
||||
|
||||
return { credentials: workspace.credentials }
|
||||
|
||||
Reference in New Issue
Block a user