16 lines
344 B
Python
16 lines
344 B
Python
|
from flask import Flask
|
||
|
|
||
|
from torchsub import torch_sub
|
||
|
|
||
|
app = Flask(__name__)
|
||
|
|
||
|
|
||
|
@app.route('/clients', methods=['GET'])
|
||
|
def clients():
|
||
|
with open(torch_sub.database_filename, 'r') as database:
|
||
|
return app.response_class(
|
||
|
response=database.read(),
|
||
|
status=200,
|
||
|
mimetype='application/json'
|
||
|
)
|