Skip to content

Commit

Permalink
Merge pull request #1555 from thehyve/do-views-update-default
Browse files Browse the repository at this point in the history
Do views update on metadata patch by default.
  • Loading branch information
ewelinagr authored Sep 2, 2024
2 parents db5987f + e709d49 commit af01c83
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import static io.fairspace.saturn.util.ValidationUtils.validate;
import static io.fairspace.saturn.util.ValidationUtils.validateIRI;

import static java.lang.Boolean.FALSE;
import static java.lang.Boolean.TRUE;
import static javax.servlet.http.HttpServletResponse.SC_BAD_REQUEST;
import static javax.servlet.http.HttpServletResponse.SC_FORBIDDEN;
import static javax.servlet.http.HttpServletResponse.SC_NO_CONTENT;
Expand Down Expand Up @@ -51,7 +51,7 @@ protected void initApp() {

put("/", (req, res) -> {
var model = deserialize(req.body(), req.contentType());
var doMaterializedViewsRefresh = req.queryParamOrDefault(DO_VIEWS_UPDATE, FALSE.toString());
var doMaterializedViewsRefresh = req.queryParamOrDefault(DO_VIEWS_UPDATE, TRUE.toString());

api.put(model, Boolean.valueOf(doMaterializedViewsRefresh));

Expand All @@ -60,7 +60,7 @@ protected void initApp() {
});
patch("/", (req, res) -> {
var model = deserialize(req.body(), req.contentType());
var doViewsUpdate = req.queryParamOrDefault(DO_VIEWS_UPDATE, FALSE.toString());
var doViewsUpdate = req.queryParamOrDefault(DO_VIEWS_UPDATE, TRUE.toString());
api.patch(model, Boolean.valueOf(doViewsUpdate));

res.status(SC_NO_CONTENT);
Expand All @@ -77,7 +77,7 @@ protected void initApp() {
}
} else {
var model = deserialize(req.body(), req.contentType());
var doMaterializedViewsRefresh = req.queryParamOrDefault(DO_VIEWS_UPDATE, FALSE.toString());
var doMaterializedViewsRefresh = req.queryParamOrDefault(DO_VIEWS_UPDATE, TRUE.toString());
api.delete(model, Boolean.valueOf(doMaterializedViewsRefresh));
}

Expand Down

0 comments on commit af01c83

Please sign in to comment.