mirror of
https://github.com/datahub-project/datahub.git
synced 2025-11-30 04:34:34 +00:00
Revert to empty ok response for update export POST
This commit is contained in:
parent
1f8b5838eb
commit
414dfd723b
@ -272,14 +272,13 @@ public class Dataset extends Controller {
|
|||||||
|
|
||||||
public static Promise<Result> updateExportPolicy(String datasetUrn) {
|
public static Promise<Result> updateExportPolicy(String datasetUrn) {
|
||||||
final String username = session("user");
|
final String username = session("user");
|
||||||
final JsonNode exportPolicy;
|
|
||||||
|
|
||||||
if (StringUtils.isBlank(username)) {
|
if (StringUtils.isBlank(username)) {
|
||||||
return Promise.promise(() -> unauthorized(_EMPTY_RESPONSE));
|
return Promise.promise(() -> unauthorized(_EMPTY_RESPONSE));
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
exportPolicy = request().body().asJson();
|
JsonNode exportPolicy = request().body().asJson();
|
||||||
|
|
||||||
EXPORT_POLICY_DAO.updateDatasetExportPolicy(datasetUrn, exportPolicy, username);
|
EXPORT_POLICY_DAO.updateDatasetExportPolicy(datasetUrn, exportPolicy, username);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
@ -287,7 +286,7 @@ public class Dataset extends Controller {
|
|||||||
return Promise.promise(() -> internalServerError(errorResponse(e)));
|
return Promise.promise(() -> internalServerError(errorResponse(e)));
|
||||||
}
|
}
|
||||||
|
|
||||||
return Promise.promise(() -> ok(Json.newObject().set("exportPolicy", Json.toJson(exportPolicy))));
|
return Promise.promise(() -> ok(_EMPTY_RESPONSE));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Promise<Result> getDatasetOwners(String datasetUrn) {
|
public static Promise<Result> getDatasetOwners(String datasetUrn) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user