Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
eoa21004 committed Oct 31, 2024
1 parent 1ffd171 commit 7add32c
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
11 changes: 11 additions & 0 deletions Backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM python:3.9-slim
WORKDIR /Docker1
COPY main.py main.py
COPY requirements.txt requirements.txt
COPY PetFuc.py PetFuc.py
COPY UserFuc.py UserFuc.py
COPY test_main.py test_main.py
RUN pip3 install -r requirements.txt
CMD [ "python3", "main.py" ]


8 changes: 0 additions & 8 deletions Backend/main.py
Original file line number Diff line number Diff line change
@@ -1,21 +1,14 @@
from flask import Flask, json, request, jsonify
import random
from PetFuc import Get_Random_Pet
from UserFuc import Add_User_Faviorte, Remove_User_Faviorte, Replace_User_Location



app = Flask(__name__)


UserAccInfo = {"Name":"eric","Location":"connecticut","Occupation":"Student"} # example user information

#Get Random Pet information - For homepage
@app.route("/Get_Random_pet", methods=["GET"])
def get_random_pet():
return Get_Random_Pet(), 200 # Return dog information


# Faviortes route. add user faviorte pet to database
@app.route("/Add_User_Faviorte", methods=["POST"])
def add_user_faviorte():
Expand All @@ -25,7 +18,6 @@ def add_user_faviorte():
#Retrun database with succses code
return jsonify(Add_User_Faviorte(json_data)), 200


# Un Faviote Route. remove user faviorte pet from there database
@app.route("/Remove_User_Faviorte", methods=["DELETE"])
def remove_user_faviorte():
Expand Down
2 changes: 2 additions & 0 deletions Backend/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Flask==3.0.3
requests==2.32.3

0 comments on commit 7add32c

Please sign in to comment.