forked from ustaxcourt/ef-cms
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #680 from flexion/staging
Sprint 6
- Loading branch information
Showing
253 changed files
with
53,343 additions
and
1,728 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
const { getAuthHeader } = require('../middleware/apiGatewayHelper'); | ||
const { handle } = require('../middleware/apiGatewayHelper'); | ||
const createApplicationContext = require('../applicationContext'); | ||
|
||
/** | ||
* creates a new document and attaches it to a case. It also creates a work item on the docket section. | ||
* | ||
* @param {Object} event | ||
* @returns {Promise<*|undefined>} | ||
*/ | ||
exports.createDocument = event => | ||
handle(() => { | ||
const userId = getAuthHeader(event); | ||
const applicationContext = createApplicationContext({ userId }); | ||
return applicationContext.getUseCases().createDocument({ | ||
caseId: event.pathParameters.caseId, | ||
document: JSON.parse(event.body), | ||
applicationContext, | ||
}); | ||
}); |
Oops, something went wrong.