authpls 0.1.0 → 0.1.1

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: bb1f8ab6bd4cc603980ffa7f719a43f5df8396a1a1ef682bce1948483266bf71
4
- data.tar.gz: 840873ee17ff22053532747c7c49f1e0191804890d40f7f70edda3d8f4d996e2
3
+ metadata.gz: 33ae06b9b36d9223ee5e4d2a8da0a717fe48ecc9a7f06c853fd503280b0ef87e
4
+ data.tar.gz: aa2f5c3d6f4b0a9a00b00c325dea961a279398ab75d1d19b4e7e2b7a5348f5d3
5
5
  SHA512:
6
- metadata.gz: 778244f8ccad0b8f30e5ac9970a753b764a56a1bf88c860d83693dc41eebe6114209898fcdbad5b842cd4dc5326ac1a237a31c78691a22a6376980b18cda17bb
7
- data.tar.gz: 33133d57aafcdc8db64f747154bfddc453c9030534fed089b3aed60dd114ef19e1255095ed320afcabbe1aceb1f14a6ced57c7c670e6b780c2c21ab5792b9962
6
+ metadata.gz: 1596ecfcf3aedaf950272f85dad56a9b350a511f14fbc4ec3cb704294bca977c62bfe85f115571903ac692def296e3806bcb81284e82e6ca4b31e7967ba8b503
7
+ data.tar.gz: 7d467f3de15c39b39485928214fecfc423684278bf01d3a0c44f5839418a8858785cb7283582a1bfe161e513e6b3da9d80cd4511c19e4414ab651d6fc866d9bb
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Authpls
4
- VERSION = "0.1.0"
4
+ VERSION = "0.1.1"
5
5
  end
@@ -72,7 +72,7 @@ module Authpls
72
72
  resource :registration, only: %i[create]
73
73
  resource :profile, only: %i[show update destroy]
74
74
  resources :users, only: %i[index show update destroy]
75
- resources :passwords, only: %i[create update]
75
+ resources :passwords, only: %i[create update], param: :token
76
76
  resources :signup_tokens, only: %i[create]
77
77
  end
78
78
  RUBY
@@ -9,15 +9,15 @@ module Auth
9
9
  PasswordsMailer.reset(user).deliver_later
10
10
  end
11
11
 
12
- render json: { message: 'Password reset instructions sent' }, status: 202
12
+ render json: { message: 'Password reset instructions sent' }, status: :accepted
13
13
  end
14
14
 
15
15
  def update
16
16
  if @user.update(params.permit(:password, :password_confirmation))
17
17
  @user.sessions.destroy_all
18
- render json: { message: 'Password has been reset.' }, status: 200
18
+ render json: { message: 'Password has been reset.' }
19
19
  else
20
- render json: { errors: @user.errors.full_messages }, status: 422
20
+ render json: { errors: @user.errors.full_messages }, status: :unprocessable_content
21
21
  end
22
22
  end
23
23
 
@@ -28,7 +28,7 @@ module Auth
28
28
  rescue ActiveSupport::MessageVerifier::InvalidSignature
29
29
  render json: {
30
30
  errors: ['Password reset link is invalid or has expired.']
31
- }, status: 401
31
+ }, status: :unauthorized
32
32
  end
33
33
  end
34
34
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: authpls
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
  - Alex Locke