Renamed a method.

This commit is contained in:
Andrew Lalis 2021-08-25 16:49:37 +02:00
parent 960f66cf13
commit b21137a767
1 changed files with 2 additions and 3 deletions

View File

@ -1,7 +1,6 @@
package nl.andrewl.concord_server; package nl.andrewl.concord_server;
import lombok.Getter; import lombok.Getter;
import lombok.extern.java.Log;
import nl.andrewl.concord_core.msg.types.Identification; import nl.andrewl.concord_core.msg.types.Identification;
import nl.andrewl.concord_core.msg.types.ServerMetaData; import nl.andrewl.concord_core.msg.types.ServerMetaData;
import nl.andrewl.concord_core.msg.types.ServerWelcome; import nl.andrewl.concord_core.msg.types.ServerWelcome;
@ -61,10 +60,10 @@ public class ConcordServer implements Runnable {
this.db.getCollection("channel-" + channelConfig.id()) this.db.getCollection("channel-" + channelConfig.id())
)); ));
} }
this.initDatabase(); this.updateDatabase();
} }
private void initDatabase() { private void updateDatabase() {
for (var channel : this.channelManager.getChannels()) { for (var channel : this.channelManager.getChannels()) {
var col = channel.getMessageCollection(); var col = channel.getMessageCollection();
if (!col.hasIndex("timestamp")) { if (!col.hasIndex("timestamp")) {