feat: admin extends user with omitting some fields
This commit is contained in:
@@ -1,5 +1,9 @@
|
|||||||
import { ObjectType, PartialType } from '@nestjs/graphql';
|
import { ObjectType, OmitType, PartialType } from '@nestjs/graphql';
|
||||||
import { User } from 'src/user/user.model';
|
import { User } from 'src/user/user.model';
|
||||||
|
|
||||||
@ObjectType()
|
@ObjectType()
|
||||||
export class Admin extends PartialType(User) {}
|
export class Admin extends OmitType(User, [
|
||||||
|
'isAdmin',
|
||||||
|
'currentRESTSession',
|
||||||
|
'currentGQLSession',
|
||||||
|
]) {}
|
||||||
|
|||||||
Reference in New Issue
Block a user