From 2f25c97b7cad2a67cdf58ecb6f5c0bd71f253acd Mon Sep 17 00:00:00 2001 From: Daniel Gerhardt <code@dgerhardt.net> Date: Sun, 16 Apr 2017 12:41:41 +0200 Subject: [PATCH] Use new user views The following replacements have been made: * New design document name - New view name: (conditions) keys => values * Full old view name: (conditions) keys => values * user/ - user/by_creation_for_inactive: (activationKey) creation => _rev * user/inactive_by_creation: (activationKey) creation => _rev - doc_by_username: username => doc * user/all: username => doc --- src/main/java/de/thm/arsnova/dao/CouchDBDao.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/de/thm/arsnova/dao/CouchDBDao.java b/src/main/java/de/thm/arsnova/dao/CouchDBDao.java index 51d78e89c..201791ade 100644 --- a/src/main/java/de/thm/arsnova/dao/CouchDBDao.java +++ b/src/main/java/de/thm/arsnova/dao/CouchDBDao.java @@ -2382,7 +2382,7 @@ public class CouchDBDao implements IDatabaseDao, ApplicationEventPublisherAware @Override public DbUser getUser(String username) { - NovaView view = new NovaView("user/all"); + NovaView view = new NovaView("user/doc_by_username"); view.setKey(username); ViewResults results = this.getDatabase().view(view); @@ -2413,7 +2413,7 @@ public class CouchDBDao implements IDatabaseDao, ApplicationEventPublisherAware @Override public int deleteInactiveUsers(long lastActivityBefore) { try { - NovaView view = new NovaView("user/inactive_by_creation"); + NovaView view = new NovaView("user/by_creation_for_inactive"); view.setEndKey(lastActivityBefore); List<Document> results = this.getDatabase().view(view).getResults(); -- GitLab