Refactored feature critical authentication classes
This commit is contained in:
@@ -54,45 +54,6 @@ public class RethinkDBService {
|
||||
log.debug("Database " + config.getDatabase() + " already exists. Error: " + e.getClass().getSimpleName());
|
||||
}
|
||||
|
||||
// rethinkdb check if table file_uploads exists
|
||||
try {
|
||||
r.db(config.getDatabase()).tableCreate("file_uploads").run(connection).stream();
|
||||
log.debug("Table 'file_uploads' created successfully.");
|
||||
} catch (ReqlOpFailedError e) {
|
||||
log.debug("Table 'file_uploads' already exists.");
|
||||
if(autoResetOnStartup) {
|
||||
log.debug("Clearing content...");
|
||||
r.db(config.getDatabase()).table("file_uploads").delete().run(connection);
|
||||
log.debug("Table 'file_uploads' cleared successfully.");
|
||||
}
|
||||
}
|
||||
|
||||
// rethinkdb check if table id_store exists
|
||||
try {
|
||||
r.db(config.getDatabase()).tableCreate("id_store").run(connection).stream();
|
||||
log.debug("Table 'id_store' created successfully.");
|
||||
} catch (ReqlOpFailedError e) {
|
||||
log.debug("Table 'id_store' already exists.");
|
||||
if(autoResetOnStartup) {
|
||||
log.debug("Clearing content...");
|
||||
r.db(config.getDatabase()).table("id_store").delete().run(connection);
|
||||
log.debug("Table 'id_store' cleared successfully.");
|
||||
}
|
||||
}
|
||||
|
||||
// rethinkdb check if table expired_file_uploads exists
|
||||
try {
|
||||
r.db(config.getDatabase()).tableCreate("expired_file_uploads").run(connection).stream();
|
||||
log.debug("Table 'expired_file_uploads' created successfully.");
|
||||
} catch (ReqlOpFailedError e) {
|
||||
log.debug("Table 'expired_file_uploads' already exists.");
|
||||
if(autoResetOnStartup) {
|
||||
log.debug("Clearing content...");
|
||||
r.db(config.getDatabase()).table("expired_file_uploads").delete().run(connection);
|
||||
log.debug("Table 'expired_file_uploads' cleared successfully.");
|
||||
}
|
||||
}
|
||||
|
||||
// rethinkdb check if table users exists
|
||||
try {
|
||||
r.db(config.getDatabase()).tableCreate("users").run(connection).stream();
|
||||
|
Reference in New Issue
Block a user