Skip to content
This repository has been archived by the owner on Jan 17, 2024. It is now read-only.

Commit

Permalink
Merge pull request #21 from mfdavies/updated-endpoints
Browse files Browse the repository at this point in the history
Remove files from testing deployment and updated apiUrl
  • Loading branch information
mfdavies authored Jan 7, 2024
2 parents 23ead67 + ac17412 commit 6bea89a
Show file tree
Hide file tree
Showing 24 changed files with 9 additions and 4,778 deletions.
18 changes: 0 additions & 18 deletions .github/workflows/firebase-hosting-pull-request.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ settings.py
backend/settings.py
.vscode
__pycache__
env
build
1 change: 0 additions & 1 deletion .python-version

This file was deleted.

1 change: 0 additions & 1 deletion Procfile

This file was deleted.

71 changes: 0 additions & 71 deletions backend/public/assets/index-mLIDEHv1.js

This file was deleted.

1 change: 0 additions & 1 deletion backend/public/assets/index-rbm1PFqH.css

This file was deleted.

Binary file removed backend/public/assets/landingDoodle-2bo-Q0ip.jpeg
Binary file not shown.
Binary file not shown.
Binary file not shown.
17 changes: 0 additions & 17 deletions backend/public/index.html

This file was deleted.

67 changes: 0 additions & 67 deletions backend/server/src/app.py

This file was deleted.

5 changes: 2 additions & 3 deletions backend/server/src/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Firebase & Flask</title>
<link rel="stylesheet" href="style.css">
<title>Flask Endpoint</title>
</head>
<body class="full-screen flex-center">
<h1 class="text-xl">Flask + Firebase</h1>
<h1 class="text-xl">Flask Endpoint Hub</h1>
<h3>{{ context.server_time }}</h3>
</body>
</html>
2 changes: 0 additions & 2 deletions cloudbuild.yaml

This file was deleted.

1 change: 0 additions & 1 deletion frontend/public/assets/index-J9g6jnVt.css

This file was deleted.

4,554 changes: 0 additions & 4,554 deletions frontend/public/assets/index-z9hD1QhJ.js

This file was deleted.

Binary file removed frontend/public/assets/landingDoodle-2bo-Q0ip.jpeg
Binary file not shown.
Binary file not shown.
Binary file not shown.
17 changes: 0 additions & 17 deletions frontend/public/index.html

This file was deleted.

4 changes: 2 additions & 2 deletions frontend/src/config.jsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
const apiUrl = process.env.REACT_APP_FLASK_API_URL || 'http://localhost:8080';
console.log(process.env.REACT_APP_FLASK_API_URL);
const apiUrl = 'https://mobility-mate-production.up.railway.app';
// console.log(process.env.REACT_APP_FLASK_API_URL);
export default apiUrl;
3 changes: 2 additions & 1 deletion frontend/src/views/patient/PatientHome.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { useState, useEffect, useCallback } from 'react';
import VoiceAI from './components/VoiceAI';
import axios from 'axios';
import Skeleton from './components/Skeleton';
import apiUrl from "../../config";
import { LogOut } from 'lucide-react';
import { useNavigate } from 'react-router-dom';

Expand All @@ -31,7 +32,7 @@ const PatientHome = () => {
});
try {
const response = await axios.get(
`http://localhost:8080/conversation/start?${queryParams.toString()}`
`${apiUrl}/conversation/start?${queryParams.toString()}`
);
setConvo((prevConvo) => {
if (prevConvo.gpt === null) {
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/views/patient/components/VoiceAI.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { useState, useEffect, useRef } from 'react';
import axios from 'axios';
import apiUrl from '../../../config';
import gsap from 'gsap';
import React, { Suspense } from 'react';

Expand Down Expand Up @@ -61,7 +62,7 @@ const VoiceAI = ({ updateUserMessage, updateGptResponse }) => {
formData.append('audioFile', audioBlob, 'recorded_audio.wav');

const response = await axios.post(
`http://localhost:8080/conversation/send_message?${queryParams.toString()}`,
`${apiUrl}/conversation/send_message?${queryParams.toString()}`,
formData
);
updateGptResponse(response.data.reply);
Expand Down
13 changes: 0 additions & 13 deletions main.py

This file was deleted.

7 changes: 0 additions & 7 deletions requirements.txt

This file was deleted.

0 comments on commit 6bea89a

Please sign in to comment.