refactor: removing unused import, commented codes, improved cursor query (#69)
* chore: refactor code in some modules * refactor: getTeamsOfUser functino * chore: remove unused import * chore: revert some changes
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import { CanActivate, ExecutionContext, Injectable } from '@nestjs/common';
|
||||
import { Reflector } from '@nestjs/core';
|
||||
import { GqlExecutionContext } from '@nestjs/graphql';
|
||||
import { User } from '../../user/user.model';
|
||||
import { TeamCollectionService } from '../team-collection.service';
|
||||
import { TeamService } from '../../team/team.service';
|
||||
import { TeamMemberRole } from '../../team/team.model';
|
||||
|
||||
@@ -415,48 +415,4 @@ export class TeamCollectionResolver {
|
||||
) {
|
||||
return this.pubsub.asyncIterator(`team_coll/${teamID}/coll_order_updated`);
|
||||
}
|
||||
|
||||
// @Mutation(() => TeamCollection, {
|
||||
// description: 'Import collection from user firestore',
|
||||
// })
|
||||
// @UseGuards(GqlAuthGuard, GqlTeamMemberGuard)
|
||||
// @RequiresTeamRole(TeamMemberRole.OWNER, TeamMemberRole.EDITOR)
|
||||
// importCollectionFromUserFirestore(
|
||||
// @Args({
|
||||
// name: 'teamID',
|
||||
// type: () => ID,
|
||||
// description: 'ID of the team to add to',
|
||||
// })
|
||||
// teamID: string,
|
||||
// @Args({
|
||||
// name: 'fbCollectionPath',
|
||||
// description:
|
||||
// 'slash separated array indicies path to the target collection',
|
||||
// })
|
||||
// fbCollectionPath: string,
|
||||
// @GqlUser() user: User,
|
||||
// @Args({
|
||||
// name: 'parentCollectionID',
|
||||
// type: () => ID,
|
||||
// description:
|
||||
// 'ID to the collection which is going to be parent to the result (null if root)',
|
||||
// nullable: true,
|
||||
// })
|
||||
// parentCollectionID?: string
|
||||
// ): Promise<TeamCollection> {
|
||||
// if (parentCollectionID) {
|
||||
// return this.teamCollectionService.importCollectionFromFirestore(
|
||||
// user.uid,
|
||||
// fbCollectionPath,
|
||||
// teamID,
|
||||
// parentCollectionID,
|
||||
// );
|
||||
// } else {
|
||||
// return this.teamCollectionService.importCollectionFromFirestore(
|
||||
// user.uid,
|
||||
// fbCollectionPath,
|
||||
// teamID,
|
||||
// );
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
import { Injectable } from '@nestjs/common';
|
||||
import { PrismaService } from '../prisma/prisma.service';
|
||||
import { Team } from '../team/team.model';
|
||||
import { TeamCollection } from './team-collection.model';
|
||||
// import { FirebaseService } from '../firebase/firebase.service';
|
||||
import {
|
||||
TEAM_COLL_SHORT_TITLE,
|
||||
TEAM_COLL_INVALID_JSON,
|
||||
|
||||
Reference in New Issue
Block a user