mirror of
https://github.com/IT4Change/gradido.git
synced 2026-02-06 09:56:05 +00:00
fix
This commit is contained in:
parent
f4c99572bd
commit
ad1185daf8
@ -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'
|
||||
|
||||
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user