VRFS-3936 mobile purchase sync fixes
This commit is contained in:
parent
afe8380280
commit
af4678cbed
|
|
@ -102,7 +102,6 @@ class ApiJamTracksController < ApiController
|
|||
if params[:mixcheck]
|
||||
checksum = JamTrackMixdown.mixdownChecksum(current_user.id, jtid)
|
||||
head :ok, checksum: checksum
|
||||
return
|
||||
else
|
||||
# 204: nothing purchased for user
|
||||
# 200: jamtrack purchase for user confirmed
|
||||
|
|
@ -111,21 +110,12 @@ class ApiJamTracksController < ApiController
|
|||
.limit(1)
|
||||
.blank?
|
||||
head(:no_content)
|
||||
return
|
||||
end
|
||||
end
|
||||
elsif params[:syncbuys]
|
||||
syncbuys = params[:syncbuys].to_i
|
||||
latestPurchase = JamTrack.latestPurchase(current_user.id)
|
||||
if 0 == syncbuys || (0 < latestPurchase && (latestPurchase <= syncbuys))
|
||||
head :no_content, latestpurchase: latestPurchase
|
||||
return
|
||||
else
|
||||
head :ok, latestpurchase: latestPurchase
|
||||
return
|
||||
end
|
||||
elsif params[:syncbuys].present?
|
||||
head :ok, purchasecount: JamTrackRight.where(user_id: current_user.id).count
|
||||
end
|
||||
head(:ok)
|
||||
head(:ok) unless performed?
|
||||
end
|
||||
|
||||
def purchased
|
||||
|
|
|
|||
Loading…
Reference in New Issue