Skip to content

Commit c6fb37f

Browse files
committed
Remove extra beforerequests
1 parent 7bd8619 commit c6fb37f

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

packet/routes/api.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@ def get_packets_by_user(username: str, info) -> dict:
2828

2929
@app.route("/api/v1/packets/<username>/newest", methods=["get"])
3030
@packet_auth
31-
@before_request
32-
def get_newest_packet_by_user(username: str, info) -> dict:
31+
def get_newest_packet_by_user(username: str) -> dict:
3332
"""
3433
Return a user's newest packet
3534
"""
@@ -49,8 +48,7 @@ def get_newest_packet_by_user(username: str, info) -> dict:
4948

5049
@app.route("/api/v1/packet/<packet_id>", methods=["get"])
5150
@packet_auth
52-
@before_request
53-
def get_packet_by_id(packet_id: int, info) -> dict:
51+
def get_packet_by_id(packet_id: int) -> dict:
5452
"""
5553
Return the scores of the packet in question
5654
"""
@@ -64,8 +62,7 @@ def get_packet_by_id(packet_id: int, info) -> dict:
6462

6563
@app.route("/api/v1/sign/<packet_id>/", methods=["POST"])
6664
@packet_auth
67-
@before_request
68-
def sign(packet_id, info):
65+
def sign(packet_id):
6966
packet = Packet.by_id(packet_id)
7067

7168
if packet is not None and packet.is_open():

0 commit comments

Comments
 (0)