mirror of
https://github.com/PartTimeHarmacist/spool.git
synced 2025-08-24 09:40:13 +00:00
Compare commits
No commits in common. "5bc7727323d32c959261cdc7e53c7286e9e1c57b" and "0861fc0080be4b6dc8a117ec3618d4350f1df173" have entirely different histories.
5bc7727323
...
0861fc0080
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,4 +1,3 @@
|
|||||||
.idea/
|
.idea/
|
||||||
venv/
|
venv/
|
||||||
static/
|
static/
|
||||||
http-client.private.*
|
|
28
app.py
28
app.py
@ -1,38 +1,12 @@
|
|||||||
import logging
|
from flask import Flask
|
||||||
from sys import stdout, stderr
|
|
||||||
from flask import Flask, request
|
|
||||||
|
|
||||||
app = Flask(__name__)
|
app = Flask(__name__)
|
||||||
|
|
||||||
log = logging.getLogger()
|
|
||||||
|
|
||||||
stdout_handler = logging.StreamHandler(stdout)
|
|
||||||
stdout_handler.setLevel(logging.DEBUG)
|
|
||||||
stdout_handler.addFilter(lambda record: record.levelno <= logging.INFO)
|
|
||||||
|
|
||||||
stderr_handler = logging.StreamHandler(stderr)
|
|
||||||
stderr_handler.setLevel(logging.WARNING)
|
|
||||||
|
|
||||||
log.addHandler(stdout_handler)
|
|
||||||
log.addHandler(stderr_handler)
|
|
||||||
|
|
||||||
|
|
||||||
@app.route('/')
|
@app.route('/')
|
||||||
def hello_world(): # put application's code here
|
def hello_world(): # put application's code here
|
||||||
return "Welcome to the initial commit - there's nothing here right now..."
|
return "Welcome to the initial commit - there's nothing here right now..."
|
||||||
|
|
||||||
|
|
||||||
@app.route('/oauth')
|
|
||||||
def oauth_endpoint():
|
|
||||||
returned_state = request.args.get('state')
|
|
||||||
returned_code = request.args.get('code')
|
|
||||||
returned_error = request.args.get('error')
|
|
||||||
|
|
||||||
if returned_error:
|
|
||||||
return f"Oauth failed due to error: {returned_error}"
|
|
||||||
|
|
||||||
return f"Oauth Endpoint\nState: {returned_state}\nCode: {returned_code}"
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
app.run()
|
app.run()
|
||||||
|
@ -1,6 +0,0 @@
|
|||||||
click==8.1.3
|
|
||||||
Flask==2.2.2
|
|
||||||
itsdangerous==2.1.2
|
|
||||||
Jinja2==3.1.2
|
|
||||||
MarkupSafe==2.1.1
|
|
||||||
Werkzeug==2.2.2
|
|
Loading…
x
Reference in New Issue
Block a user