cats_core 1.1.19 → 1.1.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4ac17edba232672ae0f11dc2042dbb8c58f7a3bbe6f5f032e3407a23292b1db8
4
- data.tar.gz: d35a4ea6ab6e34d1a3ea13b784056916a22dc60d9da2ab9e015d34863dd7173d
3
+ metadata.gz: a82354115851db50157d1387858c1b10b65c84fcbf4b78b80f7cbc51e308b6c1
4
+ data.tar.gz: 9810991a8731b4850e3950f1ba0245c49101b65adbb7f5ffc7ec8e7db6fb7cf4
5
5
  SHA512:
6
- metadata.gz: c46e405c2735c8a73c814c71429c2bfeebf2a39f8130aa574e750f996006722fed3bc7a90508fab437359c9530f50578060b3c619b5cc2a029f617515df92529
7
- data.tar.gz: c53c84bc2f39768f72eaeab44bcee50e70d621028a72bace55aa263a618b4eaf69249ca5969defad1060bbe5428bb1d60ae15926de4028eabed76a4b7a7d8ad8
6
+ metadata.gz: 75344722c714a1ab8d5b2c82ba808977f88aa141fe83e03520e92d4ccde316819932110693ac78d0523ce78e2f69417e9cb44e54b12045fc4f66870b6ccfa281
7
+ data.tar.gz: 855c87c77fa0c3517e72dc87930c959f86204ef52c46a800d53d67e2adcdd0bdd9a62251355a334707f9e0bd9f26910cde0fe895a75e69d0d7bd910fc345c77a
@@ -6,7 +6,8 @@ module Cats
6
6
  before_action :set_user, only: %i[roles assign_role stores warehouse hub]
7
7
 
8
8
  def index
9
- users = Cats::Core::User.where(application_module_id: params[:id])
9
+ users = Cats::Core::User.joins(:application_module)
10
+ .where(cats_core_application_modules: { prefix: params[:prefix] })
10
11
  render json: { success: true, data: serialize(users) }
11
12
  end
12
13
 
data/config/routes.rb CHANGED
@@ -5,7 +5,11 @@ Cats::Core::Engine.routes.draw do
5
5
  get '/notifications/unread', controller: :notifications, action: :unread
6
6
  get '/notifications/read', controller: :notifications, action: :read
7
7
 
8
- get '/application_modules/:id/users', controller: :users, action: :index, as: :application_users
8
+ resources :application_modules, param: :prefix do
9
+ member do
10
+ get 'users', controller: :users, action: :index
11
+ end
12
+ end
9
13
 
10
14
  resources :menus, only: [:index]
11
15
  resources :notifications, only: [:index] do
@@ -1,5 +1,5 @@
1
1
  module Cats
2
2
  module Core
3
- VERSION = '1.1.19'.freeze
3
+ VERSION = '1.1.20'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cats_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.19
4
+ version: 1.1.20
5
5
  platform: ruby
6
6
  authors:
7
7
  - Henock L.