Skip to content

Commit

Permalink
Tweak code and fix test.
Browse files Browse the repository at this point in the history
  • Loading branch information
NickPhura committed Dec 14, 2023
1 parent 18846ad commit fa453ea
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ describe('patchSubmissionRecord', () => {
}
});

it('should return the patched submission record', async () => {
it.only('should return the patched submission record', async () => {
const dbConnectionObj = getMockDBConnection({
commit: sinon.stub(),
rollback: sinon.stub(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ export function patchSubmissionRecord(): RequestHandler {

const submissionId = Number(req.params.submissionId);

const patch = req.body.patch as PatchSubmissionRecord;
const patch = req.body as PatchSubmissionRecord;

try {
await connection.open();
Expand Down
2 changes: 1 addition & 1 deletion app/src/hooks/api/useSubmissionsApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ const useSubmissionsApi = (axios: AxiosInstance) => {
* @return {*}
*/
const updateSubmissionRecord = async (submissionId: number, patch: { security_reviewed: boolean }) => {
const { data } = await axios.patch(`api/administrative/submission/${submissionId}`, { patch });
const { data } = await axios.patch(`api/administrative/submission/${submissionId}`, patch);

return data;
};
Expand Down

0 comments on commit fa453ea

Please sign in to comment.