From 9bab49d2f91fbb1d19c75e868bc04959ef9f135e Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Tue, 9 Jan 2018 12:39:25 -0800 Subject: Move DB stuff into Db. --- controller/DB.hpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'controller/DB.hpp') diff --git a/controller/DB.hpp b/controller/DB.hpp index 4c7a16b2..abd1483e 100644 --- a/controller/DB.hpp +++ b/controller/DB.hpp @@ -58,6 +58,26 @@ public: int64_t mostRecentDeauthTime; }; + /** + * Ensure that all network fields are present + */ + static void initNetwork(nlohmann::json &network); + + /** + * Ensure that all member fields are present + */ + static void initMember(nlohmann::json &member); + + /** + * Remove old and temporary network fields + */ + static void cleanNetwork(nlohmann::json &network); + + /** + * Remove old and temporary member fields + */ + static void cleanMember(nlohmann::json &member); + DB(EmbeddedNetworkController *const nc,const Identity &myId,const char *path); virtual ~DB(); -- cgit v1.2.3