Created
July 28, 2023 21:18
-
-
Save ertugrulozcan/df5f6f7dd6f7f1255c69406e83d7fe8d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const defaultResources = { | |
cms: [ | |
"contents", | |
"content-types", | |
"collections", | |
"pages", | |
"nested-types", | |
"cms-webhooks", | |
"cms-events", | |
"redirections", | |
"locales", | |
"files", | |
"stock-media-providers", | |
], | |
auth: [ | |
"organizations", | |
"memberships", | |
"users", | |
"user-types", | |
"roles", | |
"applications", | |
"sessions", | |
"providers", | |
"tokens", | |
"webhooks", | |
"mailhooks", | |
"files", | |
"events", | |
] | |
} | |
const isLocalizedResource = (resource: string): boolean => { | |
if (resource === "genres") { | |
console.log(`genres is cms resource ?: ${defaultResources.cms.includes(resource)}`) | |
console.log(`genres is auth resource ?: ${defaultResources.auth.includes(resource)}`) | |
} | |
return defaultResources.cms.includes(resource) || defaultResources.auth.includes(resource) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment