mirror of
https://github.com/internetee/registry.git
synced 2025-08-02 16:02:03 +02:00
fixed zeitwerk load file issue
This commit is contained in:
parent
e0e9c43575
commit
f384520cbf
5 changed files with 72 additions and 69 deletions
|
@ -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'
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue