Fix constructor temporarily, until we finish the Users accessor
This commit is contained in:
parent
3f5c9ed3a0
commit
d82ab071b6
@ -7,6 +7,7 @@ import net.frozenorb.apiv3.util.MongoUtils;
|
|||||||
import org.bson.Document;
|
import org.bson.Document;
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
@UtilityClass
|
@UtilityClass
|
||||||
public class Users {
|
public class Users {
|
||||||
@ -17,8 +18,8 @@ public class Users {
|
|||||||
MongoUtils.findAndTransform(COLLECTION_NAME, new Document(), User::new, callback);
|
MongoUtils.findAndTransform(COLLECTION_NAME, new Document(), User::new, callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void findById(String id, SingleResultCallback<User> callback) {
|
public static void findById(UUID id, SingleResultCallback<User> callback) {
|
||||||
MongoUtils.findOneAndTransform(COLLECTION_NAME, new Document("_id", id), User::new, callback);
|
MongoUtils.findOneAndTransform(COLLECTION_NAME, new Document("_id", id.toString()), User::new, callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user