Skip to content

Commit

Permalink
Update main.py
Browse files Browse the repository at this point in the history
  • Loading branch information
pdr21001 authored Apr 23, 2025
1 parent 7f0ae19 commit c2c78ac
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions backend/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
# Initialize Flask app
app = Flask(__name__)

# Initialize Swagger (Flasgger)
Swagger(app)

# SQLite database file
Expand Down Expand Up @@ -62,7 +61,7 @@ def init_db():
# API Routes
@app.route('/api/pets', methods=['GET'])
def get_pets():
"""Retrieve all pets"""
"""Retrieve all pets."""
try:
conn = get_db()
cursor = conn.cursor()
Expand All @@ -85,7 +84,7 @@ def home():

@app.route('/api/pets/<int:pet_id>', methods=['GET'])
def get_pet(pet_id):
"""Retrieve a single pet by ID"""
"""Retrieve a single pet by ID."""
try:
conn = get_db()
cursor = conn.cursor()
Expand All @@ -106,7 +105,7 @@ def get_pet(pet_id):

@app.route('/api/pets', methods=['POST'])
def add_pet():
"""Add a new pet"""
"""Add a new pet."""
try:
pet_data = request.get_json()

Expand Down

0 comments on commit c2c78ac

Please sign in to comment.