Skip to content
This repository was archived by the owner on Feb 3, 2024. It is now read-only.

Add Random Quote Route #66

Merged
merged 5 commits into from
Jun 15, 2022

Conversation

jabbate19
Copy link
Collaborator

@jabbate19 jabbate19 commented Nov 23, 2021

Adds route to flask app to return a random quote in plaintext. This can be integrated into many applications, such as members page, jumpstart, etc

Resolves #2
#1 Could use this

jabbate19 and others added 3 commits November 18, 2021 19:53
Comment on lines 381 to 382
#quote = get_quote_query(speaker = request.args.get('speaker'),
# submitter = request.args.get('submitter')).order_by(func.rand()).limit(1).all()[0][0]
Copy link
Contributor

Choose a reason for hiding this comment

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

It might be nice to leave the query args on this route, otherwise please remove the comment.

recipients = ["<[email protected]>","<[email protected]>"]
recipients = ["<[email protected]>","<active-[email protected]>"]
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you rebase? (or is github just not updated this yet)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I merged jabbate/master to jabbate/random-quote, so I don't know how git responds to that. I'll rebase it.

@mxmeinhold
Copy link
Contributor

imo, don't mark this as resolving 1, since this doesn't actually implement that. Just mention the issue so anyone working on it has this context

@jabbate19
Copy link
Collaborator Author

I believe this is good to go now

@app.route('/random', methods=['GET'])
@auth.oidc_auth
def random_quote():
quote = get_quote_query(speaker = request.args.get('speaker'), \
Copy link
Contributor

Choose a reason for hiding this comment

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

you shouldn't need the slash, not within parentheses

@jabbate19 jabbate19 merged commit a29ba0a into ComputerScienceHouse:master Jun 15, 2022
Mstrodl added a commit to Mstrodl/Quotefault that referenced this pull request Jun 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Members Integration
2 participants