fixed zeitwerk load file issue

This commit is contained in:
olegphenomenon 2022-09-30 14:21:01 +03:00
parent e0e9c43575
commit f384520cbf
5 changed files with 72 additions and 69 deletions

View file

@ -1,8 +1,8 @@
module Repp
module V1
module Registrar
if Feature.allow_accr_endspoints?
class AccreditationInfoController < BaseController
class AccreditationInfoController < BaseController
if Feature.allow_accr_endspoints?
api :GET, 'repp/v1/registrar/accreditation/get_info'
desc 'check login user and return data'

View file

@ -1,12 +1,12 @@
module Repp
module V1
module Registrar
if Feature.allow_accr_endspoints?
class AccreditationResultsController < ActionController::API
class AccreditationResultsController < ActionController::API
if Feature.allow_accr_endspoints?
before_action :authenticate_shared_key
TEMPORARY_SECRET_KEY = ENV['accreditation_secret'].freeze
EXPIRE_DEADLINE = 15.minutes.freeze
TEMPORARY_SECRET_KEY = ENV['accreditation_secret'].freeze
EXPIRE_DEADLINE = 15.minutes.freeze
api :POST, 'repp/v1/registrar/accreditation/push_results'
desc 'added datetime results'
@ -25,8 +25,7 @@ module Repp
def record_accreditation_result(username, result)
user = ApiUser.find_by(username: username)
raise ActiveRecord::RecordNotFound if user.nil?
raise ActiveRecord::RecordNotFound if user.nil?
user.accreditation_date = DateTime.current
user.accreditation_expire_date = user.accreditation_date + EXPIRE_DEADLINE