Skip to content

Commit

Permalink
Valid invitation fix (#5858)
Browse files Browse the repository at this point in the history
* Invitation expiration date changed to 7 days. Serializer updated to check for validity of invite.

* Minor tweak to valid method in the invitation serializer

* Fixed validity check for invitation

---------

Co-authored-by: Ahmad Farhat <ahmad.af.farhat@gmail.com>
  • Loading branch information
alihadimazeh and farhatahmad authored Jun 25, 2024
1 parent 1137c06 commit c3a5985
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/serializers/invitation_serializer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ class InvitationSerializer < ApplicationSerializer
attributes :id, :email, :updated_at, :valid

def valid
object.updated_at < Invitation::INVITATION_VALIDITY_PERIOD.ago
object.updated_at > Invitation::INVITATION_VALIDITY_PERIOD.ago
end
end

0 comments on commit c3a5985

Please sign in to comment.