Skip to content

Nested operation CheckEmailTokenRedisEquality

Vladislav Trotsenko edited this page Sep 26, 2019 · 2 revisions

Synopsis

The point of this nested operation is checking jwt email token equality.

Code

module Api::V1::Users::Lib::Operation
  class CheckEmailTokenRedisEquality < ApplicationOperation
    step :tokens_eql? # find the same jwt email tokin in redis
    fail Macro::AddContractError(base: 'errors.email_token.already_used')
  end
end

Used nested & macroses

Clone this wiki locally