Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Whales - Alexa Coffman #107

Open
wants to merge 31 commits into
base: master
Choose a base branch
from
Open

Conversation

AlexaCoffman
Copy link

No description provided.

…to wave 01 and 03 to account for new goal_id attribute
Copy link

@kaidamasaki kaidamasaki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well done!

Your code is clear, clean and easy to read.

Great job!

"channel" : "task-notifications",
"text" : f"Someone just completed the task {task.title}"
}
headers = {"authorization" : "Bearer " + bot_token}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reason your tests fail on Learn is because you try to use the token without first verifying that it is not None.

A check at the beginning of this that does an early return if there's no token is probably the correct way to solve this (since if Slack/not configured is down you'd like your API to still work).

try:
goal_id = int(goal_id)
except ValueError:
return jsonify({"msg" : f"'{goal_id}' is invalid"}), 400

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice job including the invalid goal_id! 😃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants