sul-dlss/argo

View on GitHub
app/controllers/technicals_controller.rb

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
# frozen_string_literal: true

class TechnicalsController < ApplicationController
  def show
    @techmd = TechmdService.techmd_for(druid: decrypted_token.fetch(:key))
  end

  private

  # decode the token that grants view access
  def decrypted_token
    Argo.verifier.verified(params[:item_id], purpose: :view_token)
  end
end