* VRFS-1135; music session history has creator, participants, and band info now.
This commit is contained in:
parent
5b44b05885
commit
de294d19bb
|
|
@ -43,9 +43,6 @@ module JamRuby
|
|||
self.comments.size
|
||||
end
|
||||
|
||||
def like_count
|
||||
self.likes.size
|
||||
end
|
||||
|
||||
def tracks
|
||||
tracks = []
|
||||
|
|
|
|||
|
|
@ -44,14 +44,6 @@ module JamRuby
|
|||
self.comments.size
|
||||
end
|
||||
|
||||
def like_count
|
||||
self.likes.size
|
||||
end
|
||||
|
||||
def play_count
|
||||
self.plays.size
|
||||
end
|
||||
|
||||
def not_already_recording
|
||||
if music_session && music_session.is_recording?
|
||||
errors.add(:music_session, ValidationMessages::ALREADY_BEING_RECORDED)
|
||||
|
|
|
|||
|
|
@ -263,6 +263,7 @@
|
|||
|
||||
$.each(joins, function(i,v) {
|
||||
if (v.client_id != clientId) {
|
||||
|
||||
client.ParticipantJoined(newSession, v);
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -7,7 +7,20 @@ glue :music_session_history do
|
|||
'music_session_history'
|
||||
end
|
||||
|
||||
attributes :id, :description, :genres, :created_at, :session_removed_at
|
||||
attributes :id, :description, :genres, :created_at, :session_removed_at, :comment_count, :like_count, :play_count
|
||||
|
||||
|
||||
child(:user => :creator) {
|
||||
attributes :id, :first_name, :last_name, :photo_url
|
||||
}
|
||||
|
||||
child(:unique_users => :participants) {
|
||||
attributes :id, :first_name, :last_name, :photo_url
|
||||
}
|
||||
|
||||
child(:band => :band) {
|
||||
attributes :id, :name, :location, :photo_url
|
||||
}
|
||||
|
||||
child(:music_session => :music_session) do
|
||||
# only show mount info if fan_access is public. Eventually we'll also need to show this in other scenarios, like if invited
|
||||
|
|
@ -28,12 +41,12 @@ glue :recording do
|
|||
|
||||
attributes :id, :band, :created_at, :duration, :comment_count, :like_count, :play_count
|
||||
|
||||
child(:band => :band) {
|
||||
child(:owner => :owner) {
|
||||
attributes :id, :name, :location, :photo_url
|
||||
}
|
||||
|
||||
child(:owner => :owner) {
|
||||
attributes :id, :name, :location, :photo_url
|
||||
child(:band => :band) {
|
||||
attributes :id, :name, :location, :photo_url
|
||||
}
|
||||
|
||||
child(:recorded_tracks => :recorded_tracks) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue