Remove flask_cors and flask_pydantic

master
John Montagu, the 4th Earl of Sandvich 2024-11-07 18:02:43 -08:00
parent 1bf4cc3125
commit 13e9bf390b
Signed by: sandvich
GPG Key ID: 9A39BE37E602B22D
3 changed files with 0 additions and 9 deletions

View File

@ -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)

View File

@ -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

View File

@ -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