Browse Source

add is_active field to UserType

ilya_shyian 1 year ago
parent
commit
a1ebe9960b
1 changed files with 6 additions and 0 deletions
  1. 6 0
      store_back/apps/authAPI/schema.py

+ 6 - 0
store_back/apps/authAPI/schema.py

@@ -24,6 +24,7 @@ class UserType(graphene.ObjectType):
     nick = graphene.String()
     username = graphene.String()
     acl = graphene.List(graphene.String)
+    is_active = graphene.Boolean()
     createdAt = graphene.String()
 
 
@@ -44,6 +45,11 @@ class UserType(graphene.ObjectType):
     def resolve_username(self,info):
         return self.username
 
+
+    def resolve_is_active(self,info):
+        return self.is_active
+
+
     def resolve_acl(self,info):
         user = User.objects.get(_id = self._id)
         acl = ["anon"]