ibrain-auth 0.3.8 → 0.3.10

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: e53c7a067d83daed1106f84e91ef43c2bfa2bf9c0dd93f28975bea0797cd03c1
4
- data.tar.gz: b53fc7d477909ea0f0b77929e3cfd611e96ef5acbb6520185d284f98a0f3de4f
3
+ metadata.gz: 7e148d1191e456ccdfd08f20518e9fb374c12a031f10c1643a9c5ed0e5c03ece
4
+ data.tar.gz: ff08832e59149dd086233b3a1c3b7cd4ac8c7105387271f36f7eed86578b94a2
5
5
  SHA512:
6
- metadata.gz: 4f8dd526a1cabb900427a717807e284f01d6252846938a8462f3eee694619d519380f657f75903e0943919acdacaf307176dc5b808d1578154e1f7aadbaebd27
7
- data.tar.gz: 8b38d0ce05fae155ea22e05429670b5446105d4faa36a500159833f579a2402e9d9cc243c8aadbedc38f3a684af5ef9c10c2a6b201e1e2f500ea1f60d23560c9
6
+ metadata.gz: 032ddedf18ff2f4a5ee3597fa0b5f506c5d02a3bf0d988b2f0d3fa5a3b66bfabf76e7b5cbe27cf57c13e0f545810e8bc4a51cd4d3185740b7f686a79e7d2da51
7
+ data.tar.gz: 8369cdf741f64524aab9c38b3cb6d5452fc595ef8ed0ee1eab7e8dd4f8d4ca53a19cb0d41e2260a149ddc4d146bdec4c90d591f39d3ffe12d5ce939039cc9fc7
@@ -8,7 +8,7 @@ module Ibrain::Mutations
8
8
  argument :attributes, Ibrain::Auth::Config.sign_up_input, required: true
9
9
  argument :device_token, String, description: 'Device token for notificaiton', required: false
10
10
 
11
- def resolve(args)
11
+ def resolve(_args)
12
12
  # TODO: define logic inside repository
13
13
  return graphql_returning(false, false) if auth_resource.blank?
14
14
 
@@ -21,10 +21,10 @@ module Ibrain::Mutations
21
21
  current_user.jti = jti
22
22
  current_user.save!
23
23
 
24
- if args[:device_token].present?
25
- device_token = current_user.device_tokens.find_by(token: args[:device_token])
24
+ if params[:device_token].present?
25
+ device_token = current_user.device_tokens.find_by(token: params[:device_token])
26
26
 
27
- current_user.device_tokens.create!({ token: args[:device_token] }) if device_token.blank?
27
+ current_user.device_tokens.create!({ token: params[:device_token] }) if device_token.blank?
28
28
  end
29
29
 
30
30
  context[:current_user] = current_user
@@ -21,10 +21,10 @@ module Ibrain::Mutations
21
21
  current_user.jti = jti
22
22
  current_user.save!
23
23
 
24
- if args[:device_token].present?
25
- device_token = current_user.device_tokens.find_by(token: args[:device_token])
24
+ if params[:device_token].present?
25
+ device_token = current_user.device_tokens.find_by(token: params[:device_token])
26
26
 
27
- current_user.device_tokens.create!({ token: args[:device_token] }) if device_token.blank?
27
+ current_user.device_tokens.create!({ token: params[:device_token] }) if device_token.blank?
28
28
  end
29
29
 
30
30
  context[:current_user] = current_user
data/config/routes.rb CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Ibrain::Auth::Engine.routes.draw do
4
4
  devise_for(:users, {
5
- class_name: 'Ibrain::User',
5
+ class_name: Ibrain.user_class,
6
6
  controllers: {
7
7
  sessions: 'ibrain/user_sessions',
8
8
  registrations: 'ibrain/user_registrations',
@@ -4,7 +4,7 @@ module Ibrain
4
4
  # frozen_string_literal: true
5
5
 
6
6
  module Auth
7
- VERSION = '0.3.8'
7
+ VERSION = '0.3.10'
8
8
 
9
9
  def self.ibrain_auth_version
10
10
  VERSION
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ibrain-auth
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.8
4
+ version: 0.3.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tai Nguyen Van
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-12-08 00:00:00.000000000 Z
11
+ date: 2022-12-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: devise