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
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ workflows:
context : org-global
filters:
branches:
only: ['develop', 'migration-setup', 'PM-577']
only: ['develop', 'migration-setup']
- deployProd:
context : org-global
filters:
Expand Down
44 changes: 42 additions & 2 deletions docs/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -487,9 +487,9 @@ paths:
$ref: "#/definitions/ApplyCopilotOpportunity"
responses:
"200":
description: "The copilot opportunity"
description: "The copilot opportunity application"
schema:
$ref: "#/definitions/CopilotOpportunity"
$ref: "#/definitions/CopilotOpportunityApplication"
"401":
description: "Unauthorized"
schema:
Expand Down Expand Up @@ -6013,6 +6013,46 @@ definitions:
format: int64
description: READ-ONLY. User that last updated this task
readOnly: true
CopilotOpportunityApplication:
type: object
properties:
id:
description: unique identifier
type: integer
format: int64
notes:
description: notes regarding the application
type: string
opportunityId:
description: copilot request id
Comment thread
hentrymartin marked this conversation as resolved.
type: integer
createdAt:
type: string
description: Datetime (GMT) when task was created
Comment thread
hentrymartin marked this conversation as resolved.
readOnly: true
createdBy:
type: integer
format: int64
description: READ-ONLY. User who created this task
Comment thread
hentrymartin marked this conversation as resolved.
readOnly: true
updatedAt:
type: string
description: READ-ONLY. Datetime (GMT) when task was updated
Comment thread
hentrymartin marked this conversation as resolved.
readOnly: true
updatedBy:
type: integer
format: int64
description: READ-ONLY. User that last updated this task
Comment thread
hentrymartin marked this conversation as resolved.
readOnly: true
deletedAt:
type: string
description: READ-ONLY. Datetime (GMT) when task was deleted
Comment thread
hentrymartin marked this conversation as resolved.
readOnly: true
deletedBy:
type: integer
format: int64
description: READ-ONLY. User that deleted this task
Comment thread
hentrymartin marked this conversation as resolved.
readOnly: true
Project:
type: object
properties:
Expand Down
5 changes: 2 additions & 3 deletions src/routes/copilotOpportunityApply/create.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,8 @@ module.exports = [
});

if (existingApplication) {
const err = new Error('User already applied for this opportunity');
err.status = 400;
return next(err);
res.status(200).json(existingApplication);
return Promise.resolve();
}

return models.CopilotApplication.create(data)
Expand Down