From ac2f17e10ff1bb099a4e9e0f88de80124bc749d0 Mon Sep 17 00:00:00 2001 From: mcilwain Date: Mon, 25 Apr 2016 15:08:10 -0700 Subject: [PATCH] Make snapshot export modules use parameters, not headers This fixes a regression introduced in the Daggerization change-over in [] and [] which incorrectly switched to using headers instead of sticking with parameters. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=120751832 --- .../domain/registry/export/ExportRequestModule.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/java/com/google/domain/registry/export/ExportRequestModule.java b/java/com/google/domain/registry/export/ExportRequestModule.java index 7e867b108..fb6e3782b 100644 --- a/java/com/google/domain/registry/export/ExportRequestModule.java +++ b/java/com/google/domain/registry/export/ExportRequestModule.java @@ -24,6 +24,7 @@ import static com.google.domain.registry.export.UpdateSnapshotViewAction.UPDATE_ import static com.google.domain.registry.export.UpdateSnapshotViewAction.UPDATE_SNAPSHOT_KIND_PARAM; import static com.google.domain.registry.export.UpdateSnapshotViewAction.UPDATE_SNAPSHOT_TABLE_ID_PARAM; import static com.google.domain.registry.request.RequestParameters.extractRequiredHeader; +import static com.google.domain.registry.request.RequestParameters.extractRequiredParameter; import com.google.domain.registry.request.Header; import com.google.domain.registry.request.Parameter; @@ -40,37 +41,37 @@ public final class ExportRequestModule { @Provides @Parameter(UPDATE_SNAPSHOT_DATASET_ID_PARAM) static String provideUpdateSnapshotDatasetId(HttpServletRequest req) { - return extractRequiredHeader(req, UPDATE_SNAPSHOT_DATASET_ID_PARAM); + return extractRequiredParameter(req, UPDATE_SNAPSHOT_DATASET_ID_PARAM); } @Provides @Parameter(UPDATE_SNAPSHOT_TABLE_ID_PARAM) static String provideUpdateSnapshotTableId(HttpServletRequest req) { - return extractRequiredHeader(req, UPDATE_SNAPSHOT_TABLE_ID_PARAM); + return extractRequiredParameter(req, UPDATE_SNAPSHOT_TABLE_ID_PARAM); } @Provides @Parameter(UPDATE_SNAPSHOT_KIND_PARAM) static String provideUpdateSnapshotKind(HttpServletRequest req) { - return extractRequiredHeader(req, UPDATE_SNAPSHOT_KIND_PARAM); + return extractRequiredParameter(req, UPDATE_SNAPSHOT_KIND_PARAM); } @Provides @Parameter(LOAD_SNAPSHOT_FILE_PARAM) static String provideLoadSnapshotFile(HttpServletRequest req) { - return extractRequiredHeader(req, LOAD_SNAPSHOT_FILE_PARAM); + return extractRequiredParameter(req, LOAD_SNAPSHOT_FILE_PARAM); } @Provides @Parameter(LOAD_SNAPSHOT_ID_PARAM) static String provideLoadSnapshotId(HttpServletRequest req) { - return extractRequiredHeader(req, LOAD_SNAPSHOT_ID_PARAM); + return extractRequiredParameter(req, LOAD_SNAPSHOT_ID_PARAM); } @Provides @Parameter(LOAD_SNAPSHOT_KINDS_PARAM) static String provideLoadSnapshotKinds(HttpServletRequest req) { - return extractRequiredHeader(req, LOAD_SNAPSHOT_KINDS_PARAM); + return extractRequiredParameter(req, LOAD_SNAPSHOT_KINDS_PARAM); } @Provides