mirror of
https://github.com/google/nomulus.git
synced 2025-05-17 17:59:41 +02:00
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
This commit is contained in:
parent
894aaa5d68
commit
ac2f17e10f
1 changed files with 7 additions and 6 deletions
|
@ -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_KIND_PARAM;
|
||||||
import static com.google.domain.registry.export.UpdateSnapshotViewAction.UPDATE_SNAPSHOT_TABLE_ID_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.extractRequiredHeader;
|
||||||
|
import static com.google.domain.registry.request.RequestParameters.extractRequiredParameter;
|
||||||
|
|
||||||
import com.google.domain.registry.request.Header;
|
import com.google.domain.registry.request.Header;
|
||||||
import com.google.domain.registry.request.Parameter;
|
import com.google.domain.registry.request.Parameter;
|
||||||
|
@ -40,37 +41,37 @@ public final class ExportRequestModule {
|
||||||
@Provides
|
@Provides
|
||||||
@Parameter(UPDATE_SNAPSHOT_DATASET_ID_PARAM)
|
@Parameter(UPDATE_SNAPSHOT_DATASET_ID_PARAM)
|
||||||
static String provideUpdateSnapshotDatasetId(HttpServletRequest req) {
|
static String provideUpdateSnapshotDatasetId(HttpServletRequest req) {
|
||||||
return extractRequiredHeader(req, UPDATE_SNAPSHOT_DATASET_ID_PARAM);
|
return extractRequiredParameter(req, UPDATE_SNAPSHOT_DATASET_ID_PARAM);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Provides
|
@Provides
|
||||||
@Parameter(UPDATE_SNAPSHOT_TABLE_ID_PARAM)
|
@Parameter(UPDATE_SNAPSHOT_TABLE_ID_PARAM)
|
||||||
static String provideUpdateSnapshotTableId(HttpServletRequest req) {
|
static String provideUpdateSnapshotTableId(HttpServletRequest req) {
|
||||||
return extractRequiredHeader(req, UPDATE_SNAPSHOT_TABLE_ID_PARAM);
|
return extractRequiredParameter(req, UPDATE_SNAPSHOT_TABLE_ID_PARAM);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Provides
|
@Provides
|
||||||
@Parameter(UPDATE_SNAPSHOT_KIND_PARAM)
|
@Parameter(UPDATE_SNAPSHOT_KIND_PARAM)
|
||||||
static String provideUpdateSnapshotKind(HttpServletRequest req) {
|
static String provideUpdateSnapshotKind(HttpServletRequest req) {
|
||||||
return extractRequiredHeader(req, UPDATE_SNAPSHOT_KIND_PARAM);
|
return extractRequiredParameter(req, UPDATE_SNAPSHOT_KIND_PARAM);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Provides
|
@Provides
|
||||||
@Parameter(LOAD_SNAPSHOT_FILE_PARAM)
|
@Parameter(LOAD_SNAPSHOT_FILE_PARAM)
|
||||||
static String provideLoadSnapshotFile(HttpServletRequest req) {
|
static String provideLoadSnapshotFile(HttpServletRequest req) {
|
||||||
return extractRequiredHeader(req, LOAD_SNAPSHOT_FILE_PARAM);
|
return extractRequiredParameter(req, LOAD_SNAPSHOT_FILE_PARAM);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Provides
|
@Provides
|
||||||
@Parameter(LOAD_SNAPSHOT_ID_PARAM)
|
@Parameter(LOAD_SNAPSHOT_ID_PARAM)
|
||||||
static String provideLoadSnapshotId(HttpServletRequest req) {
|
static String provideLoadSnapshotId(HttpServletRequest req) {
|
||||||
return extractRequiredHeader(req, LOAD_SNAPSHOT_ID_PARAM);
|
return extractRequiredParameter(req, LOAD_SNAPSHOT_ID_PARAM);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Provides
|
@Provides
|
||||||
@Parameter(LOAD_SNAPSHOT_KINDS_PARAM)
|
@Parameter(LOAD_SNAPSHOT_KINDS_PARAM)
|
||||||
static String provideLoadSnapshotKinds(HttpServletRequest req) {
|
static String provideLoadSnapshotKinds(HttpServletRequest req) {
|
||||||
return extractRequiredHeader(req, LOAD_SNAPSHOT_KINDS_PARAM);
|
return extractRequiredParameter(req, LOAD_SNAPSHOT_KINDS_PARAM);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Provides
|
@Provides
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue