Skip to content

Commit

Permalink
passed high priorty test cases refining base functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
5oappy committed Mar 18, 2024
1 parent 8fed375 commit 59f8587
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions controllers/v2/unavailability/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,18 +51,18 @@ class VolunteerUnavailabilityV2(Resource):
def __init__(self):
self.event_repository = EventRepository()

# @requires_auth
@requires_auth
@marshal_with(volunteer_unavailability_time)
# @is_user_or_has_role(None, UserType.ROOT_ADMIN)
@is_user_or_has_role(None, UserType.ROOT_ADMIN)
def get(self, user_id):
volunteer_unavailability_record = self.event_repository.get_event(user_id)
if volunteer_unavailability_record is not None:
return volunteer_unavailability_record
else:
return {"message": "No unavailability record found."}, 400

# @requires_auth
# @is_user_or_has_role(None, UserType.ROOT_ADMIN)
@requires_auth
@is_user_or_has_role(None, UserType.ROOT_ADMIN)
def post(self, user_id):
try:
args = edit_parser.parse_args()
Expand All @@ -76,7 +76,6 @@ def post(self, user_id):
return {"message": "Time frames overlap with existing events",
"overlapping events": overlapping_events}, 400


eventId = self.event_repository.create_event(
user_id,
args['title'],
Expand Down

0 comments on commit 59f8587

Please sign in to comment.