Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions docs/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5331,6 +5331,9 @@ components:
teamDescription:
type: string
description: "The description of the team"
refCode:
type: string
description: "Optional referral code"
positions:
type: array
description: "The array of positions"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
const config = require('config')

module.exports = {
up: async (queryInterface, Sequelize) => {
await queryInterface.changeColumn({ tableName: 'role_search_requests', schema: config.DB_SCHEMA_NAME}, 'job_description', {type: Sequelize.STRING(100000)})
},
down: async (queryInterface, Sequelize) => {
await queryInterface.changeColumn({ tableName: 'role_search_requests', schema: config.DB_SCHEMA_NAME}, 'job_description', {type: Sequelize.STRING(2000)})
},
}
2 changes: 1 addition & 1 deletion src/models/RoleSearchRequest.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ module.exports = (sequelize) => {
},
jobDescription: {
field: 'job_description',
type: Sequelize.STRING()
type: Sequelize.STRING(100000)
},
skills: {
type: Sequelize.ARRAY({
Expand Down
8 changes: 6 additions & 2 deletions src/services/TeamService.js
Original file line number Diff line number Diff line change
Expand Up @@ -792,7 +792,7 @@ roleSearchRequest.schema = Joi.object()
currentUser: Joi.object(),
data: Joi.object().keys({
roleId: Joi.string().uuid(),
jobDescription: Joi.string().max(2000),
jobDescription: Joi.string().max(100000),
skills: Joi.array().items(Joi.string().uuid().required()),
jobTitle: Joi.string().max(100),
previousRoleSearchRequestId: Joi.string().uuid()
Expand Down Expand Up @@ -1036,7 +1036,10 @@ async function createTeam (currentUser, data) {
description: data.teamDescription,
type: 'talent-as-a-service',
details: {
positions: data.positions
positions: data.positions,
utm: {
code: data.refCode
}
}
}
// create project with given data
Expand Down Expand Up @@ -1072,6 +1075,7 @@ createTeam.schema = Joi.object()
data: Joi.object().keys({
teamName: Joi.string().required(),
teamDescription: Joi.string(),
refCode: Joi.string(),
positions: Joi.array().items(
Joi.object().keys({
roleName: Joi.string().required(),
Expand Down