Skip to content

Commit

Permalink
swapped all routes to cloud
Browse files Browse the repository at this point in the history
  • Loading branch information
jermxt committed Oct 16, 2022
1 parent b205b4e commit 66db3c8
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion backend/users.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def setOncall():
session.close()
return jsonify(ret)

# post body: {"username": USERNAME, "friends" : ["username1", ...]}
# post body: {"username": USERNAME, "friend" : "username1"}
@users_bp.route('/addFriend/', methods=['POST'])
def addFriends():
data = request.json
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/FriendSearch/FriendSearch.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import ListItemText from '@mui/material/ListItemText';
import "./FriendSearch.css";

function FriendSearch() {
const searchUrl = "http://localhost:4000/users/addFriend/"
const searchUrl = "http://34.168.40.206:4000/users/addFriend/"

const [user, setUser] = useAtom(currUserAtom);
const [inputText, setInputText] = useState("");
Expand Down Expand Up @@ -49,7 +49,7 @@ function FriendSearch() {
};

const getFriends = async () => {
const endpoint = `http://localhost:4000/users/getFriends/?username=${user}`
const endpoint = `http://34.168.40.206:4000/users/getFriends/?username=${user}`
fetch(endpoint, {
mode: 'cors',
method: 'GET',
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/FriendsDropdown/FriendsDropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export default function FriendsDropdown() {
};

const handleSubmit = async () =>{
const response = await fetch("http://localhost:4000/users/setOncall/", {
const response = await fetch("http://34.168.40.206:4000/users/setOncall/", {
mode: 'cors',
method: 'POST',
headers: {
Expand Down Expand Up @@ -145,4 +145,4 @@ export default function FriendsDropdown() {
</div>
</div>
);
}
}
4 changes: 2 additions & 2 deletions frontend/src/pages/Login/Login.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ function Login() {

const handleLogin = async () => {

const response = await fetch("http://localhost:4000/users/login/", {
const response = await fetch("http://34.168.40.206:4000/users/login/", {
mode: 'cors',
method: 'POST',
headers: {
Expand Down Expand Up @@ -137,4 +137,4 @@ function Login() {
)
}

export default Login
export default Login
4 changes: 2 additions & 2 deletions frontend/src/pages/SignUp/SignUp.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function SignUp() {


const handleSignUp = async () => {
const response = await fetch("http://localhost:4000/users/newUser/", {
const response = await fetch("http://34.168.40.206:4000/users/newUser/", {
mode: 'cors',
method: 'POST',
headers: {
Expand Down Expand Up @@ -236,4 +236,4 @@ function SignUp() {
)
}

export default SignUp
export default SignUp

0 comments on commit 66db3c8

Please sign in to comment.