diff options
author | neodarz <neodarz@neodarz.net> | 2019-07-10 11:34:58 +0200 |
---|---|---|
committer | neodarz <neodarz@neodarz.net> | 2019-07-10 11:34:58 +0200 |
commit | 869beb6f11bcf151c9f90be36dc7a798d8e2bb2c (patch) | |
tree | a848ddd4b42302383ebb2a2598ab9067eb82d13b /umosapi/app_db/uobject.py | |
parent | 2ec8ef353eeaf133f87177cca2dae828454ba83b (diff) | |
download | umosapi-869beb6f11bcf151c9f90be36dc7a798d8e2bb2c.tar.xz umosapi-869beb6f11bcf151c9f90be36dc7a798d8e2bb2c.zip |
Add reset function
Diffstat (limited to 'umosapi/app_db/uobject.py')
-rw-r--r-- | umosapi/app_db/uobject.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/umosapi/app_db/uobject.py b/umosapi/app_db/uobject.py index 60094c7..00aa9b7 100644 --- a/umosapi/app_db/uobject.py +++ b/umosapi/app_db/uobject.py @@ -85,3 +85,9 @@ class UObject(object): "datas": datas, "code": 404 } + + def reset(self): + db = MongoDB(self.app) + mongo = db.connection() + mongo.db.uobjects.remove() + return "done" |