Junaidb commited on
Commit
1a36bbe
·
verified ·
1 Parent(s): cf62c1b

Create components/checkaccountexists.py

Browse files
Files changed (1) hide show
  1. components/checkaccountexists.py +13 -0
components/checkaccountexists.py ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from component.mongoconnection import provideClient
2
+
3
+ mc=provideClient()
4
+
5
+ db=mc["askmydoc_db"]
6
+ coll=db["askmydoc_col"]
7
+
8
+ def checkAccount(owner):
9
+ document=coll.find_one({"owner":owner})
10
+ if document:
11
+ return True
12
+ else:
13
+ return False