feat: Add 'Expertise' profile section to seed data, extend JWT token expiration times, and allow agents to retrieve profile sections by type.
This commit is contained in:
@@ -554,6 +554,32 @@ async function main() {
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: 'Expertise',
|
||||||
|
slug: 'expertise',
|
||||||
|
description: 'Areas of expertise and specialization',
|
||||||
|
icon: 'star',
|
||||||
|
sortOrder: 7,
|
||||||
|
isActive: true,
|
||||||
|
isGlobal: true,
|
||||||
|
isSystem: true,
|
||||||
|
fields: [
|
||||||
|
{
|
||||||
|
name: 'About Me',
|
||||||
|
slug: 'about_me_expertise',
|
||||||
|
fieldType: FieldType.TAG_INPUT,
|
||||||
|
description: 'Add your areas of expertise',
|
||||||
|
placeholder: 'Add Expertise',
|
||||||
|
sortOrder: 1,
|
||||||
|
isActive: true,
|
||||||
|
isRequired: false,
|
||||||
|
isSearchableOnly: false,
|
||||||
|
uiConfig: {
|
||||||
|
allowCustomOptions: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
// Agent-type-specific sections (NOT global)
|
// Agent-type-specific sections (NOT global)
|
||||||
|
|||||||
@@ -17,8 +17,8 @@ export default () => ({
|
|||||||
// JWT Authentication
|
// JWT Authentication
|
||||||
jwt: {
|
jwt: {
|
||||||
secret: process.env.JWT_SECRET || 'super-secret-key',
|
secret: process.env.JWT_SECRET || 'super-secret-key',
|
||||||
accessExpiration: process.env.JWT_ACCESS_EXPIRATION || '15m',
|
accessExpiration: process.env.JWT_ACCESS_EXPIRATION || '2h',
|
||||||
refreshExpiration: process.env.JWT_REFRESH_EXPIRATION || '7d',
|
refreshExpiration: process.env.JWT_REFRESH_EXPIRATION || '30d',
|
||||||
},
|
},
|
||||||
|
|
||||||
// Password Hashing
|
// Password Hashing
|
||||||
|
|||||||
@@ -111,9 +111,9 @@ export class ProfileSectionsController {
|
|||||||
|
|
||||||
@Get('agent-type/:agentTypeId')
|
@Get('agent-type/:agentTypeId')
|
||||||
@UseGuards(JwtAuthGuard, RolesGuard)
|
@UseGuards(JwtAuthGuard, RolesGuard)
|
||||||
@Roles(UserRole.ADMIN)
|
@Roles(UserRole.ADMIN, UserRole.AGENT)
|
||||||
@ApiBearerAuth()
|
@ApiBearerAuth()
|
||||||
@ApiOperation({ summary: 'Get all sections for an agent type with ordering (Admin only)' })
|
@ApiOperation({ summary: 'Get all sections for an agent type with ordering' })
|
||||||
@ApiQuery({ name: 'includeFields', required: false, type: Boolean })
|
@ApiQuery({ name: 'includeFields', required: false, type: Boolean })
|
||||||
getSectionsForAgentType(
|
getSectionsForAgentType(
|
||||||
@Param('agentTypeId', ParseUUIDPipe) agentTypeId: string,
|
@Param('agentTypeId', ParseUUIDPipe) agentTypeId: string,
|
||||||
|
|||||||
Reference in New Issue
Block a user