User 'you' tag; Unifying backend response format

This commit is contained in:
James Barnsley
2017-10-14 08:35:37 +13:00
parent fe011d7451
commit c36ea44925
4 changed files with 14 additions and 5 deletions

View File

@ -1 +1 @@
3.4.9
3.5.0

View File

@ -162,7 +162,8 @@ class HttpHandler(tornado.web.RequestHandler):
else:
mem.iris.raven_client.captureMessage("Method "+slug+" does not exist")
self.write({
'error': 'Method "'+slug+'" does not exist'
'status': 0,
'message': 'Method "'+slug+'" does not exist'
})
self.finish()
@ -177,14 +178,16 @@ class HttpHandler(tornado.web.RequestHandler):
except urllib2.HTTPError as e:
self.write({
'error': 'Invalid JSON payload'
'status': 0,
'message': 'Invalid JSON payload'
})
self.finish()
else:
mem.iris.raven_client.captureMessage("Method "+slug+" does not exist")
self.write({
'error': 'Method "'+slug+'" does not exist'
'status': 0,
'message': 'Method "'+slug+'" does not exist'
})
self.finish()

View File

@ -93,7 +93,7 @@ class User extends React.Component{
<ul className="details">
{this.props.user.playlists_total ? <li>{this.props.user.playlists_total ? this.props.user.playlists_total.toLocaleString() : 0} playlists</li> : null}
{this.props.user.followers ? <li>{this.props.user.followers.total.toLocaleString()} followers</li> : null}
{this.isMe() ? <li>You</li> : null}
{this.isMe() ? <li><span className="blue-text">You</span></li> : null}
</ul>
</h2>
<div className="actions">

View File

@ -393,6 +393,12 @@ footer {
background: lighten($dark_grey,10%);
color: $mid_grey;
}
h1 &,
h2 & {
line-height: 1.4em;
vertical-align: middle;
}
}