Skip to content

Commit

Permalink
Merge pull request #2847 from metabrainz/missing-profile-routes
Browse files Browse the repository at this point in the history
Fix missing profile routes
  • Loading branch information
MonkeyDo authored Apr 24, 2024
2 parents 086fadd + 47690c9 commit 53e307f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
5 changes: 3 additions & 2 deletions listenbrainz/webserver/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,9 +314,10 @@ def _register_blueprints(app):
from listenbrainz.webserver.views.playlist import playlist_bp
app.register_blueprint(playlist_bp, url_prefix='/playlist')

from listenbrainz.webserver.views.settings import settings_bp, profile_bp
from listenbrainz.webserver.views.settings import settings_bp
app.register_blueprint(settings_bp, url_prefix='/settings')
app.register_blueprint(profile_bp, url_prefix='/profile')
# Retro-compatible 'profile' endpoint
app.register_blueprint(settings_bp, url_prefix='/profile', name='profile')

from listenbrainz.webserver.views.recommendations_cf_recording import recommendations_cf_recording_bp
app.register_blueprint(recommendations_cf_recording_bp, url_prefix='/recommended/tracks')
Expand Down
3 changes: 0 additions & 3 deletions listenbrainz/webserver/views/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@


settings_bp = Blueprint("settings", __name__)
profile_bp = Blueprint("profile", __name__)

EXPORT_FETCH_COUNT = 5000

Expand Down Expand Up @@ -395,8 +394,6 @@ def missing_mb_data():
return jsonify(data)


@profile_bp.route('/', defaults={'path': ''})
@profile_bp.route('/<path:path>/')
@settings_bp.route('/', defaults={'path': ''})
@settings_bp.route('/<path:path>/')
@login_required
Expand Down

0 comments on commit 53e307f

Please sign in to comment.