Add fullfacet and fullquery endpoints, which were omitted before, for the new Jobs implementation.
Motivation
While trying to see whether the release-jobs backend is compatible with the frontend, we realized that these two endpoints were still needed.
Changes:
Adding the new endpoints in jobs.controller. To implement them, we use the same authorization model as the one for GET/jobs, combined with their previous implementations, as seen on master branch here.
As fullfacet was still producing errors, due to its complicated nature, together with @nitrosx we decided it is not a necessary fix for the MVP implementation, so most of its code is commented out and it is set to always return an empty array. It will be updated in an upcoming PR.
In utils.ts, the examples that were added are being used to describe the expected parameters for the fullquery endpoint.
Fixes:
Fixed the timestamps that are automatically added to the Job schema. Previously createdAt would be renamed to DateTime and updatedAt would be omitted. Now both fields are added as expected.
In jobs.service fixed the order of parameters passed when calling addCreatedByFields during create. Previously statusCode and statusMessage were passed in opposite places and one would take the place the other. To complete this fix, all relevant tests were updated.
Tests included
Added 12 tests for fullquery.
Added 2 tests for fullfacet. More will be added when the implementation is finished.
Description
Add
fullfacet
andfullquery
endpoints, which were omitted before, for the new Jobs implementation.Motivation
While trying to see whether the
release-jobs
backend is compatible with the frontend, we realized that these two endpoints were still needed.Changes:
jobs.controller
. To implement them, we use the same authorization model as the one forGET/jobs
, combined with their previous implementations, as seen onmaster
branch here.fullfacet
was still producing errors, due to its complicated nature, together with @nitrosx we decided it is not a necessary fix for the MVP implementation, so most of its code is commented out and it is set to always return an empty array. It will be updated in an upcoming PR.utils.ts
, the examples that were added are being used to describe the expected parameters for thefullquery
endpoint.Fixes:
Job schema
. PreviouslycreatedAt
would be renamed toDateTime
andupdatedAt
would be omitted. Now both fields are added as expected.jobs.service
fixed the order of parameters passed when callingaddCreatedByFields
duringcreate
. PreviouslystatusCode
andstatusMessage
were passed in opposite places and one would take the place the other. To complete this fix, all relevant tests were updated.Tests included
fullquery
.fullfacet
. More will be added when the implementation is finished.