Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(refactor) Replace usages of /ws/rest/v1/ with restBaseUrl #13

Merged
merged 4 commits into from
Mar 7, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 12 additions & 10 deletions __mocks__/bills.mock.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { restBaseUrl } from '@openmrs/esm-framework';

export const billsSummary = [
{
uuid: '65f9f19a-f70e-44f4-9c6c-55b23dab4a3f',
Expand All @@ -17,7 +19,7 @@ export const billsSummary = [
links: [
{
rel: 'self',
uri: 'http://localhost:8089/openmrs/ws/rest/v1/location/381595a0-2229-4152-9c45-bd3692aac7cc',
uri: `http://localhost:8089/openmrs${restBaseUrl}/location/381595a0-2229-4152-9c45-bd3692aac7cc`,
resourceAlias: 'location',
},
],
Expand All @@ -29,7 +31,7 @@ export const billsSummary = [
links: [
{
rel: 'self',
uri: 'http://localhost:8089/openmrs/ws/rest/v1/provider/48b55692-e061-4ffa-b1f2-fd4aaf506224',
uri: `http://localhost:8089/openmrs${restBaseUrl}/provider/48b55692-e061-4ffa-b1f2-fd4aaf506224`,
resourceAlias: 'provider',
},
],
Expand Down Expand Up @@ -57,7 +59,7 @@ export const billsSummary = [
links: [
{
rel: 'self',
uri: 'http://localhost:8089/openmrs/ws/rest/v1/patient/dda9b65f-0037-11ec-85e7-04ed33c79a3e',
uri: `http://localhost:8089/openmrs${restBaseUrl}/patient/dda9b65f-0037-11ec-85e7-04ed33c79a3e`,
resourceAlias: 'patient',
},
],
Expand Down Expand Up @@ -125,7 +127,7 @@ export const billsSummary = [
links: [
{
rel: 'self',
uri: 'http://localhost:8089/openmrs/ws/rest/v1/location/381595a0-2229-4152-9c45-bd3692aac7cc',
uri: `http://localhost:8089/openmrs${restBaseUrl}/location/381595a0-2229-4152-9c45-bd3692aac7cc`,
resourceAlias: 'location',
},
],
Expand All @@ -137,7 +139,7 @@ export const billsSummary = [
links: [
{
rel: 'self',
uri: 'http://localhost:8089/openmrs/ws/rest/v1/provider/48b55692-e061-4ffa-b1f2-fd4aaf506224',
uri: `http://localhost:8089/openmrs${restBaseUrl}/provider/48b55692-e061-4ffa-b1f2-fd4aaf506224`,
resourceAlias: 'provider',
},
],
Expand Down Expand Up @@ -165,7 +167,7 @@ export const billsSummary = [
links: [
{
rel: 'self',
uri: 'http://localhost:8089/openmrs/ws/rest/v1/patient/dda9b65f-0037-11ec-85e7-04ed33c79a3e',
uri: `http://localhost:8089/openmrs${restBaseUrl}/patient/dda9b65f-0037-11ec-85e7-04ed33c79a3e`,
resourceAlias: 'patient',
},
],
Expand Down Expand Up @@ -234,7 +236,7 @@ export const billsSummary = [
links: [
{
rel: 'self',
uri: 'http://localhost:8089/openmrs/ws/rest/v1/location/381595a0-2229-4152-9c45-bd3692aac7cc',
uri: `http://localhost:8089/openmrs${restBaseUrl}/location/381595a0-2229-4152-9c45-bd3692aac7cc`,
resourceAlias: 'location',
},
],
Expand All @@ -246,7 +248,7 @@ export const billsSummary = [
links: [
{
rel: 'self',
uri: 'http://localhost:8089/openmrs/ws/rest/v1/provider/48b55692-e061-4ffa-b1f2-fd4aaf506224',
uri: `http://localhost:8089/openmrs${restBaseUrl}/provider/48b55692-e061-4ffa-b1f2-fd4aaf506224`,
resourceAlias: 'provider',
},
],
Expand Down Expand Up @@ -274,7 +276,7 @@ export const billsSummary = [
links: [
{
rel: 'self',
uri: 'http://localhost:8089/openmrs/ws/rest/v1/patient/dda9b65f-0037-11ec-85e7-04ed33c79a3e',
uri: `http://localhost:8089/openmrs${restBaseUrl}/patient/dda9b65f-0037-11ec-85e7-04ed33c79a3e`,
resourceAlias: 'patient',
},
],
Expand Down Expand Up @@ -341,7 +343,7 @@ export const mockBill = {
links: [
{
rel: 'self',
uri: 'https://data.kenyahmis.org:8500/openmrs/ws/rest/v1/provider/fe00dd43-4c39-4ce9-9832-bc3620c80c6c',
uri: `https://data.kenyahmis.org:8500/openmrs${restBaseUrl}/provider/fe00dd43-4c39-4ce9-9832-bc3620c80c6c`,
resourceAlias: 'provider',
},
],
Expand Down
16 changes: 9 additions & 7 deletions __mocks__/delivery-summary.mock.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { restBaseUrl } from '@openmrs/esm-framework';

export const mockLabourAndDeliveryData = {
data: {
results: [
Expand All @@ -11,7 +13,7 @@ export const mockLabourAndDeliveryData = {
links: [
{
rel: 'self',
uri: 'http://backend:8080/openmrs/ws/rest/v1/patient/b835eff8-98c9-4988-887b-d93da7fbd542',
uri: `http://backend:8080/openmrs${restBaseUrl}/patient/b835eff8-98c9-4988-887b-d93da7fbd542`,
resourceAlias: 'patient',
},
],
Expand All @@ -23,7 +25,7 @@ export const mockLabourAndDeliveryData = {
links: [
{
rel: 'self',
uri: 'http://backend:8080/openmrs/ws/rest/v1/form/9e1a0c68-ca19-3482-9ffb-0a6b4e591c2a',
uri: `http://backend:8080/openmrs${restBaseUrl}/form/9e1a0c68-ca19-3482-9ffb-0a6b4e591c2a`,
resourceAlias: 'form',
},
],
Expand All @@ -34,7 +36,7 @@ export const mockLabourAndDeliveryData = {
links: [
{
rel: 'self',
uri: 'http://backend:8080/openmrs/ws/rest/v1/encountertype/dd528487-82a5-4082-9c72-ed246bd49591',
uri: `http://backend:8080/openmrs${restBaseUrl}/encountertype/dd528487-82a5-4082-9c72-ed246bd49591`,
resourceAlias: 'encountertype',
},
],
Expand All @@ -46,7 +48,7 @@ export const mockLabourAndDeliveryData = {
links: [
{
rel: 'self',
uri: 'http://backend:8080/openmrs/ws/rest/v1/obs/04d7d2a2-8ffd-418c-9a0c-1d20dec50231',
uri: `http://backend:8080/openmrs${restBaseUrl}/obs/04d7d2a2-8ffd-418c-9a0c-1d20dec50231`,
resourceAlias: 'obs',
},
],
Expand All @@ -57,7 +59,7 @@ export const mockLabourAndDeliveryData = {
links: [
{
rel: 'self',
uri: 'http://backend:8080/openmrs/ws/rest/v1/obs/5ca0c815-2c47-4cda-8c46-1e118b593ea8',
uri: `http://backend:8080/openmrs${restBaseUrl}/obs/5ca0c815-2c47-4cda-8c46-1e118b593ea8`,
resourceAlias: 'obs',
},
],
Expand All @@ -71,12 +73,12 @@ export const mockLabourAndDeliveryData = {
links: [
{
rel: 'self',
uri: 'http://backend:8080/openmrs/ws/rest/v1/encounter/3b4daf81-7372-475c-ba5d-13c9c21d8ab1',
uri: `http://backend:8080/openmrs${restBaseUrl}/encounter/3b4daf81-7372-475c-ba5d-13c9c21d8ab1`,
resourceAlias: 'encounter',
},
{
rel: 'full',
uri: 'http://backend:8080/openmrs/ws/rest/v1/encounter/3b4daf81-7372-475c-ba5d-13c9c21d8ab1?v=full',
uri: `http://backend:8080/openmrs${restBaseUrl}/encounter/3b4daf81-7372-475c-ba5d-13c9c21d8ab1?v=full`,
resourceAlias: 'encounter',
},
],
Expand Down
Loading
Loading