File tree Expand file tree Collapse file tree 2 files changed +5
-17
lines changed
Expand file tree Collapse file tree 2 files changed +5
-17
lines changed Original file line number Diff line number Diff line change @@ -1669,22 +1669,6 @@ export const getSearchContexts = async (domain: string) => sew(() =>
16691669 } , /* minRequiredRole = */ OrgRole . GUEST ) , /* allowAnonymousAccess = */ true
16701670 ) ) ;
16711671
1672- export const clearSearchContexts = async ( domain : string ) => sew ( ( ) =>
1673- withAuth ( ( userId ) =>
1674- withOrgMembership ( userId , domain , async ( { org } ) => {
1675- await prisma . searchContext . deleteMany ( {
1676- where : {
1677- orgId : org . id ,
1678- } ,
1679- } ) ;
1680-
1681- return {
1682- success : true ,
1683- } ;
1684- } , /* minRequiredRole = */ OrgRole . OWNER )
1685- )
1686- )
1687-
16881672export const getRepoImage = async ( repoId : number ) : Promise < ArrayBuffer | ServiceError > => sew ( async ( ) => {
16891673 return await withOptionalAuthV2 ( async ( { org, prisma } ) => {
16901674 const repo = await prisma . repo . findUnique ( {
Original file line number Diff line number Diff line change @@ -68,7 +68,11 @@ const initSingleTenancy = async () => {
6868 // the entitlement, synced search contexts, and then no longer had the entitlement
6969 const hasSearchContextEntitlement = hasEntitlement ( "search-contexts" )
7070 if ( ! hasSearchContextEntitlement ) {
71- clearSearchContexts ( SINGLE_TENANT_ORG_DOMAIN )
71+ await prisma . searchContext . deleteMany ( {
72+ where : {
73+ orgId : SINGLE_TENANT_ORG_ID ,
74+ } ,
75+ } ) ;
7276 }
7377
7478 // Sync anonymous access config from the config file
You can’t perform that action at this time.
0 commit comments