mirror of
https://0xacab.org/jvoisin/mat2-web.git
synced 2025-05-11 18:55:02 -04:00
addded oas for upload endpoint
This commit is contained in:
parent
7ba88acf09
commit
6aa9fa7029
4 changed files with 88 additions and 2 deletions
2
main.py
2
main.py
|
@ -5,6 +5,7 @@ from matweb import utils, rest_api, frontend
|
|||
from flask import Flask
|
||||
from flask_restful import Api
|
||||
from flask_cors import CORS
|
||||
from flasgger import Swagger
|
||||
|
||||
|
||||
def create_app(test_config=None):
|
||||
|
@ -28,6 +29,7 @@ def create_app(test_config=None):
|
|||
|
||||
# Restful API hookup
|
||||
api = Api(app)
|
||||
swagger = Swagger(app)
|
||||
CORS(app, resources={r"/api/*": {"origins": utils.get_allow_origin_header_value()}})
|
||||
api.add_resource(
|
||||
rest_api.APIUpload,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue