Remove flask_cors and flask_pydantic
parent
1bf4cc3125
commit
13e9bf390b
|
@ -1,5 +1,4 @@
|
|||
from flask import Blueprint, Flask, make_response, request
|
||||
from flask_cors import CORS
|
||||
|
||||
import login
|
||||
import schedule
|
||||
|
@ -8,12 +7,6 @@ from models import init_db
|
|||
from spec import spec
|
||||
|
||||
app = Flask(__name__)
|
||||
#CORS(app, origins=["http://localhost:5173"], supports_credentials=True)
|
||||
#CORS(login.api_login, origins=["http://localhost:5173"], supports_credentials=True)
|
||||
#CORS(schedule.api_schedule, origins=["http://localhost:5173"], supports_credentials=True)
|
||||
CORS(app, origins=["*"], supports_credentials=True)
|
||||
CORS(login.api_login, origins=["*"], supports_credentials=True)
|
||||
CORS(schedule.api_schedule, origins=["*"], supports_credentials=True)
|
||||
|
||||
init_db(app)
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
import datetime
|
||||
from typing import cast
|
||||
from flask import Blueprint, abort, jsonify, make_response, request
|
||||
from flask_pydantic import validate
|
||||
from spectree import Response
|
||||
from models import Player, PlayerTeam, PlayerTeamAvailability, PlayerTeamRole, db
|
||||
from middleware import requires_authentication
|
||||
|
|
|
@ -4,7 +4,6 @@ from typing import List
|
|||
from flask import Blueprint, abort, jsonify, make_response, request
|
||||
import pydantic
|
||||
from pydantic.v1 import validator
|
||||
from flask_pydantic import validate
|
||||
from spectree import Response
|
||||
from sqlalchemy.orm import joinedload, subqueryload
|
||||
from models import Player, PlayerSchema, PlayerTeam, PlayerTeamAvailability, PlayerTeamRole, PlayerTeamSchema, Team, TeamSchema, db
|
||||
|
|
Loading…
Reference in New Issue