synapse-react-client
Version:
[](https://badge.fury.io/js/synapse-react-client) [](https://github.com/prettier/prettie
28 lines (27 loc) • 757 B
JavaScript
import { RESEARCH_PROJECT as R, ACCESS_REQUIREMENT_RESEARCH_PROJECT_FOR_UPDATE as n } from "../../../utils/APIConstants.js";
import { http as e, HttpResponse as o } from "msw";
import { MOCK_RESEARCH_PROJECT as E } from "../../dataaccess/MockResearchProject.js";
function a(r) {
return [
e.post(`${r}${R}`, async ({ request: t }) => {
const s = await t.json();
return o.json(s, { status: 201 });
}),
e.get(
`${r}${n(
":id"
)}`,
({ params: t }) => {
const s = {
...E,
accessRequirementId: t.id.toString()
};
return o.json(s, { status: 200 });
}
)
];
}
export {
a as getResearchProjectHandlers
};
//# sourceMappingURL=researchProjectHandlers.js.map