shop cover
This commit is contained in:
@@ -3,7 +3,9 @@ class Api::ShopsController < Api::ApiController
|
|||||||
skip_before_action :set_current_tenant_by_subdomain_or_name, only: [:index, :show]
|
skip_before_action :set_current_tenant_by_subdomain_or_name, only: [:index, :show]
|
||||||
|
|
||||||
def index
|
def index
|
||||||
@shops = Shop.select('id, logo, name, shop_code').where.not(cloud_url: nil).all
|
@shops = Shop.select('shops.id, logo, shops.name, shops.shop_code,image as cover')
|
||||||
|
.left_joins(:display_images)
|
||||||
|
.where.not(cloud_url: nil).order('shop_code,display_images.created_at desc').uniq
|
||||||
end
|
end
|
||||||
|
|
||||||
def show
|
def show
|
||||||
|
|||||||
Reference in New Issue
Block a user