mirror of
https://github.com/spl0k/supysonic.git
synced 2024-11-09 19:52:16 +00:00
Fixed LastFM account linking
This commit is contained in:
parent
1b0cc54581
commit
dd33e8da14
@ -58,7 +58,7 @@ def user_index():
|
|||||||
@frontend.route('/user/<uid>')
|
@frontend.route('/user/<uid>')
|
||||||
@me_or_uuid
|
@me_or_uuid
|
||||||
def user_profile(uid, user):
|
def user_profile(uid, user):
|
||||||
return render_template('profile.html', user = user, has_lastfm = current_app.config['LASTFM']['api_key'] != None, clients = user.clients)
|
return render_template('profile.html', user = user, api_key = current_app.config['LASTFM']['api_key'], clients = user.clients)
|
||||||
|
|
||||||
@frontend.route('/user/<uid>', methods = [ 'POST' ])
|
@frontend.route('/user/<uid>', methods = [ 'POST' ])
|
||||||
@me_or_uuid
|
@me_or_uuid
|
||||||
|
@ -54,7 +54,7 @@
|
|||||||
<label class="sr-only" for="lastfm">LastFM status</label>
|
<label class="sr-only" for="lastfm">LastFM status</label>
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<div class="input-group-addon">LastFM status</div>
|
<div class="input-group-addon">LastFM status</div>
|
||||||
{% if has_lastfm %}
|
{% if api_key != None %}
|
||||||
{% if user.lastfm_session %}
|
{% if user.lastfm_session %}
|
||||||
<input type="text" class="form-control" id="lastfm" placeholder="{% if user.lastfm_status %}Linked{% else %}Invalid session{% endif %}" readonly>
|
<input type="text" class="form-control" id="lastfm" placeholder="{% if user.lastfm_status %}Linked{% else %}Invalid session{% endif %}" readonly>
|
||||||
<div class="input-group-btn">
|
<div class="input-group-btn">
|
||||||
|
Loading…
Reference in New Issue
Block a user