Skip to content

Commit

Permalink
Revert "BREAKING CHANGE: Url alias will be disabled on content types …
Browse files Browse the repository at this point in the history
…by default"

This reverts commit d4086e7.
  • Loading branch information
boazpoolman committed Oct 23, 2023
1 parent 6e30cd2 commit ea257e5
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 35 deletions.
27 changes: 0 additions & 27 deletions MIGRATION.md

This file was deleted.

6 changes: 0 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,6 @@ await fetch(`${API_URL}/api/url-alias/get?path=/about-page`);
// GET /api/url-alias/get?path=/about-page
```

## Migration guides

See [MIGRATION.md](./MIGRATION.md)



## 🔗 Links

- [NPM package](https://www.npmjs.com/package/@strapi-community/strapi-plugin-url-alias)
Expand Down
2 changes: 1 addition & 1 deletion lib/schemas/pluginOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import { object, boolean, InferType } from "yup";

export const pluginOptionsSchema = object({
enabled: boolean().default(false),
enabled: boolean().default(true),
});

export type PluginOptions = InferType<typeof pluginOptionsSchema>;
2 changes: 1 addition & 1 deletion server/util/enabledContentTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export const isContentTypeEnabled = (uid: string) => {
if (isInContentManager === false) return false;

const urlAliasPluginOptionsRaw = _.get(pluginOptions, [pluginId], {});
const urlAliasOptions = pluginOptionsSchema.cast(urlAliasPluginOptionsRaw);
const urlAliasOptions = pluginOptionsSchema.cast(urlAliasPluginOptionsRaw );

if (!urlAliasOptions.enabled) return false;

Expand Down

0 comments on commit ea257e5

Please sign in to comment.