Merge pull request 'fix: with app.app_context()' (#1) from PeterSurda/inoreader2readwise:feature/separate-services into feature/separate-services
Reviewed-on: swapnil/inoreader2readwise#1
This commit is contained in:
commit
fec1929d72
|
@ -17,8 +17,9 @@ class Token(db.Model):
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
return f'<Token {self.id}>'
|
return f'<Token {self.id}>'
|
||||||
|
|
||||||
# Initialize the database
|
# Create an application context
|
||||||
db.create_all()
|
with app.app_context():
|
||||||
|
db.create_all()
|
||||||
|
|
||||||
# API to create a new token entry
|
# API to create a new token entry
|
||||||
@app.route('/token', methods=['POST'])
|
@app.route('/token', methods=['POST'])
|
||||||
|
|
Loading…
Reference in New Issue
Block a user