mirror of
https://github.com/google/nomulus
synced 2026-02-05 04:21:07 +00:00
Add limit to list_domains command
This allows list_domains to continue working for large TLDs. TESTED=Deploys to alpha and it works to list the most recently created domains even on a TLD with a huge number of domains on it (much more than .app has currently). ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=196717389
This commit is contained in:
@@ -16,6 +16,7 @@ package google.registry.tools.server;
|
||||
|
||||
import static com.google.common.base.Strings.emptyToNull;
|
||||
import static google.registry.request.RequestParameters.extractBooleanParameter;
|
||||
import static google.registry.request.RequestParameters.extractIntParameter;
|
||||
import static google.registry.request.RequestParameters.extractOptionalParameter;
|
||||
import static google.registry.request.RequestParameters.extractRequiredParameter;
|
||||
|
||||
@@ -90,6 +91,12 @@ public class ToolsServerModule {
|
||||
return ImmutableSet.copyOf(Splitter.on(',').split(tldsString));
|
||||
}
|
||||
|
||||
@Provides
|
||||
@Parameter("limit")
|
||||
static int provideLimit(HttpServletRequest req) {
|
||||
return extractIntParameter(req, "limit");
|
||||
}
|
||||
|
||||
@Provides
|
||||
@Parameter("rawKeys")
|
||||
static String provideRawKeys(HttpServletRequest req) {
|
||||
|
||||
Reference in New Issue
Block a user