Skip to content

Comments

fix: aligns global preview config with the docs#1940

Merged
JarrodMFlesch merged 2 commits intomasterfrom
fix/1929-global-config-preview
Jan 23, 2023
Merged

fix: aligns global preview config with the docs#1940
JarrodMFlesch merged 2 commits intomasterfrom
fix/1929-global-config-preview

Conversation

@JarrodMFlesch
Copy link
Contributor

@JarrodMFlesch JarrodMFlesch commented Jan 23, 2023

Description

Fixes #1929

The documentation was correct, but the implementation was incorrect. Moved the global configs top level preview property to admin.preview to align with documentation and the collection config.

  • I have read and understand the CONTRIBUTING.md document in this repository

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist:

  • I have added tests that prove my fix is effective or that my feature works
  • Existing test suite passes locally with my changes
  • I have made corresponding changes to the documentation

Copy link
Contributor

@DanRibbens DanRibbens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd expect to see preview: joi.func(), added under admin in src/globals/config/schema.ts like we have in src/collections/config/schema.ts.

@JarrodMFlesch
Copy link
Contributor Author

JarrodMFlesch commented Jan 23, 2023

@DanRibbens absolutely 👍

Changes made here

@JarrodMFlesch JarrodMFlesch merged commit e7908b7 into master Jan 23, 2023
@JarrodMFlesch JarrodMFlesch deleted the fix/1929-global-config-preview branch January 23, 2023 22:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Preview function not allowed for Global configs

2 participants