lol_auth 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 50efce898322f9571d067b6b19e16838408edea6
4
- data.tar.gz: 7b5c461bc3ad9fd44c7de24851d8c7fd24cf10fd
3
+ metadata.gz: 19fa7c1f0c9880b17832b9637de9c0e5e5ae2b1f
4
+ data.tar.gz: 10c30378adc6755b4ef1e9fad1db0e844967b41a
5
5
  SHA512:
6
- metadata.gz: 4308267c46f7cb70d43e9a77b4cd71c72bb3a5dda4f5a455ada7c3ddddd149b7a2cb1f753cd47ba70269625e93910d3e2627a56397d7196ed01f4a477f768882
7
- data.tar.gz: 400a7d5332ca4c099d81031fd40917faa0eab6038189462789cf677891ae7a5bc2e80e6aadd1f1944a710556a10f448e59a23fc8eca51dee8a3da641885b36ac
6
+ metadata.gz: 934453aa47005137dbd131724658c33f01d7a90ed3f3adaeeaccd4624c8ef4d6442d191853d650711105751f88b4625ca1ab54db7885dc04de5ea8c2ebe52801
7
+ data.tar.gz: a6e63fc62353ffb521a1e4def05beb5c10a2af329a2d5669e4dbf14228440dd448ec6bb9016661e741ffe05be7d78e4434672e60c894f0e668a11cdb36a0375c
@@ -1,4 +1,7 @@
1
1
  module LolAuth
2
2
  class ApplicationController < ActionController::Base
3
+ include DeviseTokenAuth::Concerns::SetUserByToken
4
+
5
+ before_action :authenticate_user!
3
6
  end
4
7
  end
@@ -14,4 +14,17 @@ module LolAuth
14
14
  render :success, status: 201
15
15
  end
16
16
  end
17
+
18
+ def update_avatar
19
+ @user = current_user
20
+ @user.avatar = avatar_params[:avatar]
21
+
22
+ if @user.save
23
+ UserStateManager.new(user: @user).process
24
+
25
+ render :success, status: 201
26
+ else
27
+ render :fail, status: 422
28
+ end
29
+ end
17
30
  end
@@ -1,3 +1,3 @@
1
1
  module LolAuth
2
- VERSION = '0.1.0'
2
+ VERSION = '0.1.1'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lol_auth
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eduardo Zaghi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-09-04 00:00:00.000000000 Z
11
+ date: 2018-04-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -100,14 +100,14 @@ dependencies:
100
100
  requirements:
101
101
  - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: 2.6.3
103
+ version: '2'
104
104
  type: :runtime
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
- version: 2.6.3
110
+ version: '2'
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: carrierwave
113
113
  requirement: !ruby/object:Gem::Requirement