Moved url_prefix to bp mount instead of creation
	
		
			
	
		
	
	
		
			
				
	
				continuous-integration/drone the build failed
				
					Details
				
			
		
	
				
					
				
			
				
	
				continuous-integration/drone the build failed
				
					Details
				
			
		
	
							parent
							
								
									274a870a6a
								
							
						
					
					
						commit
						5d36a8e533
					
				|  | @ -1,9 +1,9 @@ | |||
| """Entrypoint for the program.""" | ||||
| from quart import Quart | ||||
| from app.api import blueprint | ||||
| from app.api import api_bp | ||||
| 
 | ||||
| app = Quart("jos", static_folder="web/dist", static_url_path="/") | ||||
| app.register_blueprint(blueprint) | ||||
| app.register_blueprint(api_bp, url_prefix="/api") | ||||
| 
 | ||||
| 
 | ||||
| @app.route("/", methods=["GET"], defaults={"path": ""}) | ||||
|  |  | |||
|  | @ -1,8 +1,8 @@ | |||
| """Module containing all Flask-related code.""" | ||||
| from quart import Blueprint | ||||
| from .search import blueprint as search_blueprint | ||||
| from .search import search_bp | ||||
| 
 | ||||
| 
 | ||||
| # Main blueprint exposing entire API | ||||
| blueprint = Blueprint("api", __name__, url_prefix="/api") | ||||
| blueprint.register_blueprint(search_blueprint) | ||||
| api_bp = Blueprint("api", __name__) | ||||
| api_bp.register_blueprint(search_bp, url_prefix="/search") | ||||
|  |  | |||
|  | @ -2,10 +2,10 @@ | |||
| from quart import Blueprint | ||||
| 
 | ||||
| 
 | ||||
| blueprint = Blueprint("search", __name__, url_prefix="/search") | ||||
| search_bp = Blueprint("search", __name__) | ||||
| 
 | ||||
| 
 | ||||
| @blueprint.route("/", methods=["GET"]) | ||||
| @search_bp.route("/", methods=["GET"]) | ||||
| async def search_spotify(): | ||||
|     """Search the Spotify API.""" | ||||
|     return "yeet" | ||||
|  |  | |||
		Reference in New Issue