Skip to content

Commit

Permalink
fix(entityManifest): admin props not displayed in manifest, Closes #269
Browse files Browse the repository at this point in the history
  • Loading branch information
brunobuddy committed Jan 22, 2025
1 parent f32492d commit 5ebf456
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions packages/core/manifest/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,21 @@ export const DEFAULT_IMAGE_SIZES: ImageSizesObject = {
}
}

export const AUTHENTICABLE_PROPS: PropertyManifest[] = [
{
name: 'email',
type: PropType.Email,
hidden: true,
validation: { isNotEmpty: true }
},
{
name: 'password',
type: PropType.Password,
hidden: true,
validation: { isNotEmpty: true }
}
]

// Admin entity.
export const DEFAULT_ADMIN_CREDENTIALS = {
email: 'admin@manifest.build',
Expand All @@ -41,7 +56,7 @@ export const ADMIN_ENTITY_MANIFEST: EntityManifest = {
authenticable: true,
nameSingular: 'admin',
namePlural: 'admins',
properties: [],
properties: AUTHENTICABLE_PROPS,
relationships: [],
belongsToMany: [],
policies: {
Expand All @@ -53,21 +68,6 @@ export const ADMIN_ENTITY_MANIFEST: EntityManifest = {
}
}

export const AUTHENTICABLE_PROPS: PropertyManifest[] = [
{
name: 'email',
type: PropType.Email,
hidden: true,
validation: { isNotEmpty: true }
},
{
name: 'password',
type: PropType.Password,
hidden: true,
validation: { isNotEmpty: true }
}
]

// Reserved words that are not considered as filters.
export const QUERY_PARAMS_RESERVED_WORDS = [
'page',
Expand Down

0 comments on commit 5ebf456

Please sign in to comment.