UNPKG

synapse-react-client

Version:

[![npm version](https://badge.fury.io/js/synapse-react-client.svg)](https://badge.fury.io/js/synapse-react-client) [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettie

28 lines (27 loc) 757 B
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