This commit is contained in:
einhornimmond 2025-10-04 10:33:43 +02:00
parent f4c99572bd
commit ad1185daf8
2 changed files with 0 additions and 29 deletions

View File

@ -227,14 +227,6 @@ describe('CommunityResolver', () => {
let foreignCom4: DbFederatedCommunity
beforeEach(async () => {
<<<<<<< HEAD
=======
jest.clearAllMocks()
await userFactory(testEnv, peterLustig)
// login as admin
await mutate({ mutation: login, variables: peterLoginData })
>>>>>>> refactor_community_auth
comHomeCom1 = DbCommunity.create()
comHomeCom1.foreign = false
comHomeCom1.url = 'http://localhost'

View File

@ -24,24 +24,6 @@ import { CONFIG } from '@/config'
@Resolver()
export class CommunityResolver {
<<<<<<< HEAD
=======
@Authorized([RIGHTS.COMMUNITIES])
@Query(() => [FederatedCommunity])
async getCommunities(): Promise<FederatedCommunity[]> {
const dbFederatedCommunities: DbFederatedCommunity[] = await DbFederatedCommunity.find({
order: {
foreign: 'ASC',
createdAt: 'DESC',
lastAnnouncedAt: 'DESC',
},
})
return dbFederatedCommunities.map(
(dbCom: DbFederatedCommunity) => new FederatedCommunity(dbCom),
)
}
>>>>>>> refactor_community_auth
@Authorized([RIGHTS.COMMUNITY_WITH_API_KEYS])
@Query(() => [AdminCommunityView])
async allCommunities(@Args() paginated: Paginated): Promise<AdminCommunityView[]> {
@ -113,10 +95,7 @@ export class CommunityResolver {
}
await DbCommunity.save(homeCom)
}
<<<<<<< HEAD
=======
>>>>>>> refactor_community_auth
return new AdminCommunityView(homeCom)
}
}