Skip to content

Commit

Permalink
feat(endpoint-posts): always hide advanced options when creating new …
Browse files Browse the repository at this point in the history
…post
  • Loading branch information
paulrobertlloyd committed Apr 13, 2024
1 parent f5f2807 commit 8a0e42c
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions packages/endpoint-posts/lib/middleware/post-data.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,6 @@ export const postData = {
// Only select ‘checked’ syndication targets on first view
const checkTargets = Object.entries(request.body).length === 0;

// Only show advanced options if one of those fields has been updated
const showAdvancedOptions =
properties.category || properties.location || properties.visibility;

response.locals = {
accessToken: access_token,
action: "create",
Expand All @@ -36,7 +32,7 @@ export const postData = {
postType,
properties,
scope,
showAdvancedOptions,
showAdvancedOptions: false,
syndicationTargetItems: getSyndicateToItems(publication, checkTargets),
type: h,
...response.locals,
Expand Down

0 comments on commit 8a0e42c

Please sign in to comment.