mirror of
https://github.com/datahub-project/datahub.git
synced 2025-11-02 11:49:23 +00:00
Change export policy api POST to return updated information upon success
This commit is contained in:
parent
1595b91117
commit
b03c9379b8
@ -25,7 +25,7 @@ public class ExportPolicyDao {
|
||||
throw new UnsupportedOperationException("Not implemented yet");
|
||||
}
|
||||
|
||||
public void updateDatasetExportPolicy(@Nonnull DatasetExportPolicy record, @Nonnull String user) throws Exception {
|
||||
public void updateDatasetExportPolicy(@Nonnull datasetUrn, @Nonnull DatasetExportPolicy record, @Nonnull String user) throws Exception {
|
||||
throw new UnsupportedOperationException("Not implemented yet");
|
||||
|
||||
}
|
||||
|
||||
@ -280,13 +280,13 @@ public class Dataset extends Controller {
|
||||
try {
|
||||
JsonNode exportPolicy = request().body().asJson();
|
||||
|
||||
EXPORT_POLICY_DAO.updateDatasetExportPolicy(exportPolicy, username);
|
||||
EXPORT_POLICY_DAO.updateDatasetExportPolicy(datasetUrn, exportPolicy, username);
|
||||
} catch (Exception e) {
|
||||
Logger.error("Update dataset export policy fail", e);
|
||||
return Promise.promise(() -> internalServerError(errorResponse(e)));
|
||||
}
|
||||
|
||||
return Promise.promise(() -> ok(_EMPTY_RESPONSE));
|
||||
return Promise.promise(() -> ok(Json.newObject().set("exportPolicy", Json.toJson(exportPolicy))));
|
||||
}
|
||||
|
||||
public static Promise<Result> getDatasetOwners(String datasetUrn) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user