diff --git a/Chemistry Cafe API.http b/Chemistry Cafe API.http index 0942da6..5bfda6a 100644 --- a/Chemistry Cafe API.http +++ b/Chemistry Cafe API.http @@ -1,4 +1,4 @@ -@Chemistry_Cafe_API_HostAddress = http://localhost:5134 +@Chemistry_Cafe_API_HostAddress = http://localhost:8080 GET {{Chemistry_Cafe_API_HostAddress}}/weatherforecast/ Accept: application/json diff --git a/Properties/launchSettings.json b/Properties/launchSettings.json index 6205f67..1c86ca3 100644 --- a/Properties/launchSettings.json +++ b/Properties/launchSettings.json @@ -8,7 +8,7 @@ "ASPNETCORE_ENVIRONMENT": "Development" }, "dotnetRunMessages": true, - "applicationUrl": "http://localhost:5134" + "applicationUrl": "http://localhost:8080" }, "https": { "commandName": "Project", @@ -18,7 +18,7 @@ "ASPNETCORE_ENVIRONMENT": "Development" }, "dotnetRunMessages": true, - "applicationUrl": "https://localhost:7226;http://localhost:5134" + "applicationUrl": "https://localhost:7226;http://localhost:8080" }, "IIS Express": { "commandName": "IISExpress", diff --git a/README.md b/README.md index db14b6f..88c29e8 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ Then build the project dotnet run ``` -This should start a server. You should be able to access a swagger page on the port that the server stars, for example [http://localhost:5134/swagger](http://localhost:5134) +This should start a server. You should be able to access a swagger page on the port that the server stars, for example [http://localhost:8080/swagger](http://localhost:8080) ## Installing the API locally To build and install Chemistry Cafe locally, you must have Visual Studio 2022. diff --git a/frontend/src/API/API_CreateMethods.tsx b/frontend/src/API/API_CreateMethods.tsx index a4492bf..b468d45 100644 --- a/frontend/src/API/API_CreateMethods.tsx +++ b/frontend/src/API/API_CreateMethods.tsx @@ -4,7 +4,7 @@ import { FamilyTagMechList, TagMechanismReactionList, TagMechanismSpeciesList, P export async function createFamily(name: string) { try { const response = await axios.post( - 'http://localhost:5134/api/Family/create', + 'http://localhost:8080/api/Family/create', "\"" + name + "\"", { headers: { @@ -28,7 +28,7 @@ export async function createFamilyTagMechList(familyMechListData: FamilyTagMechL }; const response = await axios.post( - 'http://localhost:5134/api/FamilyTagMechList/create', + 'http://localhost:8080/api/FamilyTagMechList/create', requestData, { headers: { @@ -46,7 +46,7 @@ export async function createFamilyTagMechList(familyMechListData: FamilyTagMechL export async function createTagMechanism(name: string) { try { const response = await axios.post( - 'http://localhost:5134/api/TagMechanism/create', + 'http://localhost:8080/api/TagMechanism/create', "\"" + name + "\"", { headers: { @@ -64,7 +64,7 @@ export async function createTagMechanism(name: string) { export async function createReaction(type: string) { try { const response = await axios.post( - 'http://localhost:5134/api/Reaction/create', + 'http://localhost:8080/api/Reaction/create', "\"" + type + "\"", { headers: { @@ -82,7 +82,7 @@ export async function createReaction(type: string) { export async function createSpecies(type: string) { try { const response = await axios.post( - 'http://localhost:5134/api/Species/create', + 'http://localhost:8080/api/Species/create', "\"" + type + "\"", { headers: { @@ -106,7 +106,7 @@ export async function createTagMechanismReactionList(tagMechanismReactionListDat version: tagMechanismReactionListData.version, }; return axios.post( - 'http://localhost:5134/api/TagMechanismReactionList/create', + 'http://localhost:8080/api/TagMechanismReactionList/create', requestData, { headers: { @@ -134,7 +134,7 @@ export async function createTagMechanismSpeciesList(tagMechanismSpeciesListDataA version: tagMechanismSpeciesListData.version, }; return axios.post( - 'http://localhost:5134/api/TagMechanismSpeciesList/create', + 'http://localhost:8080/api/TagMechanismSpeciesList/create', requestData, { headers: { @@ -160,7 +160,7 @@ export async function createPropertyList(propertyList: PropertyList) { }; const response = await axios.post( - 'http://localhost:5134/api/PropertyList/create', + 'http://localhost:8080/api/PropertyList/create', requestData, { headers: { @@ -192,7 +192,7 @@ export async function createPropertyVersion(propertyVersion: PropertyVersion) { }; const response = await axios.post( - 'http://localhost:5134/api/PropertyVersion/create', + 'http://localhost:8080/api/PropertyVersion/create', requestData, { headers: { @@ -217,7 +217,7 @@ export async function createReactantProduct(reactantProductList: ReactantProduct }; const response = await axios.post( - 'http://localhost:5134/api/ReactantProductList/create', + 'http://localhost:8080/api/ReactantProductList/create', requestData, { headers: { diff --git a/frontend/src/API/API_DeleteMethods.tsx b/frontend/src/API/API_DeleteMethods.tsx index 62fc299..9bd1ab1 100644 --- a/frontend/src/API/API_DeleteMethods.tsx +++ b/frontend/src/API/API_DeleteMethods.tsx @@ -4,7 +4,7 @@ import axios from 'axios'; export async function deleteFamily(uuid: string) { try { const response = await axios.delete( - `http://localhost:5134/api/Family/delete/${uuid}`, + `http://localhost:8080/api/Family/delete/${uuid}`, { headers: { 'Content-Type': 'application/json', @@ -21,7 +21,7 @@ export async function deleteFamily(uuid: string) { export async function deleteFamMechList(uuid: string) { try { const response = await axios.delete( - `http://localhost:5134/api/FamilyMechList/delete/${uuid}`, + `http://localhost:8080/api/FamilyMechList/delete/${uuid}`, { headers: { 'Content-Type': 'application/json', @@ -38,7 +38,7 @@ export async function deleteFamMechList(uuid: string) { export async function deleteTagMechanism(uuid: string) { try { const response = await axios.delete( - `http://localhost:5134/api/TagMechanism/delete/${uuid}`, + `http://localhost:8080/api/TagMechanism/delete/${uuid}`, { headers: { 'Content-Type': 'application/json', diff --git a/frontend/src/API/API_UpdateMethods.tsx b/frontend/src/API/API_UpdateMethods.tsx index 34e47ed..4135e45 100644 --- a/frontend/src/API/API_UpdateMethods.tsx +++ b/frontend/src/API/API_UpdateMethods.tsx @@ -11,7 +11,7 @@ export async function updatePropertyList(propertyList: PropertyList) { }; const response = await axios.put( - 'http://localhost:5134/api/PropertyList/update', + 'http://localhost:8080/api/PropertyList/update', requestData, { headers: { @@ -36,7 +36,7 @@ export async function updateReactantProductList(reactantProductList: ReactantPro }; const response = await axios.put( - 'http://localhost:5134/api/ReactantProductList/update', + 'http://localhost:8080/api/ReactantProductList/update', requestData, { headers: { diff --git a/frontend/test/API_CreateMethods.test.tsx b/frontend/test/API_CreateMethods.test.tsx index 98cd17c..cf99e95 100644 --- a/frontend/test/API_CreateMethods.test.tsx +++ b/frontend/test/API_CreateMethods.test.tsx @@ -37,7 +37,7 @@ describe('API methods', () => { const result = await createFamily(name); expect(mockedCreate).toHaveBeenCalledWith( - `http://localhost:5134/api/Family/create`, + `http://localhost:8080/api/Family/create`, `"${name}"`, { headers: { 'Content-Type': 'application/json' }, @@ -60,7 +60,7 @@ describe('API methods', () => { const result = await createFamilyTagMechList(familyMechListData); expect(mockedPost).toHaveBeenCalledWith( - 'http://localhost:5134/api/FamilyTagMechList/create', + 'http://localhost:8080/api/FamilyTagMechList/create', familyMechListData, { headers: { 'Content-Type': 'application/json' }, @@ -77,7 +77,7 @@ describe('API methods', () => { const result = await createTagMechanism(name); expect(mockedPost).toHaveBeenCalledWith( - 'http://localhost:5134/api/TagMechanism/create', + 'http://localhost:8080/api/TagMechanism/create', `"${name}"`, { headers: { 'Content-Type': 'application/json' }, @@ -94,7 +94,7 @@ describe('API methods', () => { const result = await createReaction(type); expect(mockedPost).toHaveBeenCalledWith( - 'http://localhost:5134/api/Reaction/create', + 'http://localhost:8080/api/Reaction/create', `"${type}"`, { headers: { 'Content-Type': 'application/json' }, @@ -111,7 +111,7 @@ describe('API methods', () => { const result = await createSpecies(type); expect(mockedPost).toHaveBeenCalledWith( - 'http://localhost:5134/api/Species/create', + 'http://localhost:8080/api/Species/create', `"${type}"`, { headers: { 'Content-Type': 'application/json' }, @@ -132,7 +132,7 @@ describe('API methods', () => { const result = await createPropertyList(propertyList); expect(mockedPost).toHaveBeenCalledWith( - 'http://localhost:5134/api/PropertyList/create', + 'http://localhost:8080/api/PropertyList/create', propertyList, { headers: { 'Content-Type': 'application/json' }, @@ -162,7 +162,7 @@ describe('API methods', () => { const result = await createPropertyVersion(propertyVersion); expect(mockedPost).toHaveBeenCalledWith( - 'http://localhost:5134/api/PropertyVersion/create', + 'http://localhost:8080/api/PropertyVersion/create', propertyVersion, { headers: { 'Content-Type': 'application/json' }, @@ -185,7 +185,7 @@ describe('API methods', () => { const result = await createReactantProduct(reactantProduct); expect(mockedPost).toHaveBeenCalledWith( - 'http://localhost:5134/api/ReactantProductList/create', + 'http://localhost:8080/api/ReactantProductList/create', reactantProduct, { headers: { 'Content-Type': 'application/json' }, diff --git a/frontend/test/API_DeleteMethods.test.tsx b/frontend/test/API_DeleteMethods.test.tsx index 0a1e34f..8024999 100644 --- a/frontend/test/API_DeleteMethods.test.tsx +++ b/frontend/test/API_DeleteMethods.test.tsx @@ -30,7 +30,7 @@ describe('API delete functions tests', () => { // Verify axios.delete was called with the correct URL and headers expect(mockedDelete).toHaveBeenCalledWith( - `http://localhost:5134/api/Family/delete/${uuid}`, + `http://localhost:8080/api/Family/delete/${uuid}`, { headers: { 'Content-Type': 'application/json' }, } @@ -49,7 +49,7 @@ describe('API delete functions tests', () => { // Verify axios.delete was called with the correct URL and headers expect(mockedDelete).toHaveBeenCalledWith( - `http://localhost:5134/api/FamilyMechList/delete/${uuid}`, + `http://localhost:8080/api/FamilyMechList/delete/${uuid}`, { headers: { 'Content-Type': 'application/json' }, } @@ -68,7 +68,7 @@ describe('API delete functions tests', () => { // Verify axios.delete was called with the correct URL and headers expect(mockedDelete).toHaveBeenCalledWith( - `http://localhost:5134/api/TagMechanism/delete/${uuid}`, + `http://localhost:8080/api/TagMechanism/delete/${uuid}`, { headers: { 'Content-Type': 'application/json' }, } diff --git a/frontend/test/API_UpdateMethods.test.tsx b/frontend/test/API_UpdateMethods.test.tsx index 733a462..ee45607 100644 --- a/frontend/test/API_UpdateMethods.test.tsx +++ b/frontend/test/API_UpdateMethods.test.tsx @@ -35,7 +35,7 @@ describe('API delete functions tests', () => { const result = await updatePropertyList(propertyList); expect(mockedPost).toHaveBeenCalledWith( - 'http://localhost:5134/api/PropertyList/update', + 'http://localhost:8080/api/PropertyList/update', propertyList, { headers: { 'Content-Type': 'application/json' }, @@ -58,7 +58,7 @@ describe('API delete functions tests', () => { const result = await updateReactantProductList(reactantProduct); expect(mockedPost).toHaveBeenCalledWith( - 'http://localhost:5134/api/ReactantProductList/update', + 'http://localhost:8080/api/ReactantProductList/update', reactantProduct, { headers: { 'Content-Type': 'application/json' },