feat: admin extends user with omitting some fields

This commit is contained in:
Mir Arif Hasan
2023-10-19 14:49:20 +06:00
parent 1790163df6
commit 489370f82b

View File

@@ -1,5 +1,9 @@
import { ObjectType, PartialType } from '@nestjs/graphql';
import { ObjectType, OmitType, PartialType } from '@nestjs/graphql';
import { User } from 'src/user/user.model';
@ObjectType()
export class Admin extends PartialType(User) {}
export class Admin extends OmitType(User, [
'isAdmin',
'currentRESTSession',
'currentGQLSession',
]) {}